[sqlalchemy] Need Urgent Help - SQLAlchemy Relation

2011-02-18 Thread Abdul Gaffar
Hi all, If anybody can give the complete example of User, Group, permission, Project table with the association table, that should work with repoze authentication and authorization framework. User table sholud contain --- user_id, user_name, email_address Group table should

Re: [sqlalchemy] Need Urgent Help - SQLAlchemy Relation

2011-02-18 Thread Florian Mueller
On 18 February 2011 11:34, Abdul Gaffar gaffar.infoval...@gmail.com wrote: If anybody can give the complete example of User, Group, permission, Project table with the association table, that should work with repoze authentication and authorization framework. User table sholud contain

[sqlalchemy] mortar_rdb 1.0.0 released!

2011-02-18 Thread Chris Withers
Hi All, I'm very pleased to finally announce the release of mortar_rdb 1.0.0. This package ties together SQLAlchemy, sqlalchemy-migrate and the component architecture to make it easy to develop projects using SQLAlchemy through their complete lifecycle. While I'll be using it with Pyramid, the

Re: [sqlalchemy] Need Urgent Help -Many to Many Relations

2011-02-18 Thread Chris Withers
On 17/02/2011 11:07, Abdul Gaffar wrote: Hi all, Can I respectfully suggest that you read the following carefully: http://www.catb.org/~esr/faqs/smart-questions.html Specifically: http://www.catb.org/~esr/faqs/smart-questions.html#urgent Repeat postings of the same question are pretty

Re: [sqlalchemy] Transactional DDL and SQLite?

2011-02-18 Thread Daniel Holth
Thanks Mike. I will have to edit the pysqlite C source code if I want to prevent it from committing when the query does not contain any of the strings select, insert, update, delete, or replace. if (!strcmp(buf, select)) { return STATEMENT_SELECT; } else if (!strcmp(buf,

Re: [sqlalchemy] Find whether a synonym points to a foreign key or a relationship

2011-02-18 Thread Hector Blanco
I'll give it a try!! Thank you! 2011/2/18 Michael Bayer mike...@zzzcomputing.com: On Feb 17, 2011, at 6:37 PM, Hector Blanco wrote: Hello everyone! Let's say I have a class defined like this: class User(declarativeBase):       Represents a user       __tablename__ = users       _id =

[sqlalchemy] Eager loading object graph

2011-02-18 Thread Randall Nortman
I have working code -- I just want to make sure I'm doing this the best way. If I have a graph of related objects, spanning numerous tables and relationships, including many-to-many, and I want to eagerly load the entire graph (rooted in some selected row or rows of one of the tables) in a single

Re: [sqlalchemy] Transactional DDL and SQLite?

2011-02-18 Thread Michael Bayer
we've put tickets on their tracker to this effect, that they should be more liberal about considering when the transaction begins. http://code.google.com/p/pysqlite/issues/detail?id=21 pysqlite is tricky since I dont know if the Python.org tracker or the code.google.com tracker is more

Re: [sqlalchemy] Eager loading object graph

2011-02-18 Thread Michael Bayer
On Feb 18, 2011, at 11:09 AM, Randall Nortman wrote: I have working code -- I just want to make sure I'm doing this the best way. If I have a graph of related objects, spanning numerous tables and relationships, including many-to-many, and I want to eagerly load the entire graph (rooted in

[sqlalchemy] Re: Eager loading object graph

2011-02-18 Thread Randall Nortman
On Feb 18, 11:22 am, Michael Bayer mike...@zzzcomputing.com wrote: On Feb 18, 2011, at 11:09 AM, Randall Nortman wrote: [...] are you watching the SQL emitted when you load everything ?   in 0.7, we've made a change to contains_eager() such that what you have above will work as expected.  

Re: [sqlalchemy] Transactional DDL and SQLite?

2011-02-18 Thread Daniel Holth
It looks like SQLAlchemy 0.7's events make it a lot easer to prepend /* select */ to every statement. Daniel -- 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

[sqlalchemy] object changes

2011-02-18 Thread Alexander Solovyov
Hi, what's the right way to detemine what changed on an object? I use ext.declarative and mapper extension, which calls code in the end of message after_insert and before_update. It skips M2M relations because .get_history() call loads everything in memory. Is there better way to determine

Re: [sqlalchemy] Transactional DDL and SQLite?

2011-02-18 Thread Daniel Holth
I thought I could prepend /* update * / to every statement but that didn't work. Instead, https://bitbucket.org/dholth/pysqlite/changeset/cdc3a85dcb49 Obviously it should be a flag. Something like pysqlite2.surprise_transactions(False) -- You received this message because you are subscribed