t is. It will be fine for now.
On Dec 24, 1:53 am, Michael Bayer wrote:
> On Dec 23, 2010, at 8:38 PM, kindly wrote:
>
>
>
> > Hello
>
> > Is there a nice way to get the subquery object that relates to anon_1
> > in the below case so you can use it to filter on?
>
Hello
Is there a nice way to get the subquery object that relates to anon_1
in the below case so you can use it to filter on?
You can get it by q._joinpoint['_joinpoint_entity'] but that is
clearly private.
Thanks
David
class Employee(object):pass
class Manager(Employee):pass
class
ve and pathologically
"add"ing will do the trick.
On Sep 29, 12:20 am, Michael Bayer wrote:
> On Sep 28, 2010, at 6:32 PM, kindly wrote:
>
> > I have been doing some profiling on a batch job I have been running.
>
> > I control all my own cascading,
I have been doing some profiling on a batch job I have been running.
I control all my own cascading, so I set the cascade flag on each
relation to "none". Even so mapper.cascade_iterator does quite a lot
of work.
I did the crudest test by just placing a return at the top of
cascade_iterator. It
Thanks for doing 1853 so quickly.
On Jul 15, 5:57 pm, Michael Bayer wrote:
> hello again !
>
> Just a week and a half ago, we put out version 0.6.2. Wouldn't you know it,
> the very next day someone came along and reported an issue that wasn't hard
> to fix but I felt really, really had to go
Perfect. I really thought I had read all the documentation. Thanks
again.
On 28 Nov, 18:45, Michael Bayer wrote:
> On Nov 28, 2009, at 10:25 AM, kindly wrote:
>
>
>
> > Is there a way of, with every orm update to add extra conditions to
> > the where clause and to che
Is there a way of, with every orm update to add extra conditions to
the where clause and to check (and rollback if fail) that the row that
was supposed to be updated actually was. i.e
user = session.query(User).get(4) ## id of 4
user.name = "fred" ## a change to user name
session.add(user)
sess
Hello,
The version recipe on the wiki will version if the object is dirty,
but I thought it would be more useful if it did it only when there was
an actual change.
The diff is below, added a test too, and I would be happy to upload it
after someone looks over it?
The recipe is at
http://www.sq
Instead of the first commit use flush. You have already committed so
you cant roll back.
so
session.begin()
try:
p=parent()
session.add(p)
session.flush()
c=child()
c.p_id=p.id
session.add(c)
session.commit()
except:
session.rollback()
On May 20, 11:31 am, manm
You add the relation to the propoties on mapper.
Look at
http://www.sqlalchemy.org/docs/05/mappers.html#basic-relational-patterns
On Feb 24, 4:10 pm, Marcin Krol wrote:
> Hello everyone,
>
> I've been following
> tutorialhttp://www.sqlalchemy.org/docs/05/ormtutorial.htmlwhich explains how
>
lled.
>
> On Feb 23, 2009, at 5:16 PM, Michael Bayer wrote:
>
>
>
> > there is not, you'd have to do something along the lines of:
>
> > for prop in local_mapper.iterate_properties:
> > getattr(local_mapper.class_, prop.key).impl.active_history =
>
lled.
>
> On Feb 23, 2009, at 5:16 PM, Michael Bayer wrote:
>
>
>
> > there is not, you'd have to do something along the lines of:
>
> > for prop in local_mapper.iterate_properties:
> > getattr(local_mapper.class_, prop.key).impl.active_history
lled.
>
> On Feb 23, 2009, at 5:16 PM, Michael Bayer wrote:
>
>
>
> > there is not, you'd have to do something along the lines of:
>
> > for prop in local_mapper.iterate_properties:
> > getattr(local_mapper.class_, prop.key).impl.active_history
does and do your history operation inline.
>
> On Feb 18, 2009, at 9:43 AM, kindly wrote:
>
>
>
> > Hello
>
> > I intend to log any changes (not new rows) to a table.
>
> > The simplist way I can see to do this is to check every object that is
> > "
e latest trunk you can pass "myobject" straight to get_history
> without using instance_state.
>
> session.is_modified() just calls get_history() on every attribute, so
> you might want to consider just looping through the attributes the way
> is_modfied() does and do your his
Hello
I intend to log any changes (not new rows) to a table.
The simplist way I can see to do this is to check every object that is
"add"ed for changes. I intend to, before every flush, look in "dirty"
then use is_modified and if there is a change use get_history to find
out the original and ne
I have just started working on "another" kind of declarative layer for
SQLalchemy. Infact it is more like a domain specific language for
setting up basic form orientated databases for small charities in
order to provide viable alternative to Access for simple information
storage needs. The detail
17 matches
Mail list logo