[sqlalchemy] Re: SA 0.3.x: performance issues

2006-12-05 Thread Sanjay
instance changes get picked up. if you want the more simplistic comparison method (i.e. using is), set up your PickleType with the flag mutable=False. You meant like this? Column('content', PickleType, mutable=False) thanks sanjay --~--~-~--~~~---~--~~

[sqlalchemy] Selection criteria in a property(one-to-many) of a mapped object

2006-12-05 Thread Sanjay
Might be a novice question... Say I have a business object Website, mapped using assign_mapper, having a property(relation to Page object) pages. Needing suggestion on what is a best way to fetch selective pages for a particular website. E.g. website = Website.get(1) # website.pages is a list

[sqlalchemy] Re: ArgumentError: Property 'scientific_name' specified with secondary join condition but no secondary argument

2006-12-05 Thread Michael Bayer
what the message is attempting to say, it is invalid to specify the secondaryjoin keyword argument without also specifying the secondary keyword argument, which points to the association table. --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: Selection criteria in a property(one-to-many) of a mapped object

2006-12-05 Thread Michael Bayer
if you want to query pages, then just query for the Page class explicitly: session.query(Page).select(criterion) the relations on a parent class are not used for selective querying. if there is a particular filtered view you will need often, you might also want to add special properties to

[sqlalchemy] sqlalchemy limiting

2006-12-05 Thread dischdennis
At startup of a zope application I am mapping the complete resultset for all users. Now I would like to restrict the resultset depending on the logged user before showing in table view because it takes a long time in table view when having 1 rows mapped. How is it possible to restrict on the

[sqlalchemy] Re: SA 0.3.x: performance issues

2006-12-05 Thread Michael Bayer
Sanjay wrote: instance changes get picked up. if you want the more simplistic comparison method (i.e. using is), set up your PickleType with the flag mutable=False. You meant like this? Column('content', PickleType, mutable=False) like this Column('content',

[sqlalchemy] Re: German SQLAlchemy article published

2006-12-05 Thread Michael Bayer
oreilly are you listening ? :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to

[sqlalchemy] Re: Data of association table not getting flushed while multiple changes are done

2006-12-05 Thread Michael Bayer
i will grant that this behavior is sub-optimal, and also that its in conflict with the docs - I have just updated the docs on the site to represent this current behavior: http://www.sqlalchemy.org/docs/unitofwork.myt#unitofwork_changed im not exactly sure of a clean way to restore the 0.2

[sqlalchemy] Re: sqlalchemy limiting

2006-12-05 Thread Jonathan Ellis
http://www.sqlalchemy.org/docs/plugins.myt#plugins_selectresults On 12/5/06, dischdennis [EMAIL PROTECTED] wrote: What exactly is the SelectResults extension and where can I get it? -- Jonathan Ellis http://spyced.blogspot.com --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: columns inheritance

2006-12-05 Thread Jonathan Ellis
On 12/4/06, ml [EMAIL PROTECTED] wrote: Hi! I'm looking for something like Postgresql's CREATE TABLE a ... LIKE b. Is there any similar construction in SA? I created a simple function def inherit_table(name, table, *args, **kwargs): args = list(args) for c in table.columns:

[sqlalchemy] Re: Using pickle to save reflected metadata

2006-12-05 Thread Michael Bayer
you probably want to use toMetadata() on them with a plain MetaData object so that the pickled stream does not contain any references to engines. then on the way back in you would call toMetadata() again with your BoundMetaData (or Dynamic, whichever you are using). if anything itll be a great