I'd suggest putting all your model stuff in one file. I had separated out my model across several files and grew to dislike it.
Other than that, I don't see anything wrong. I checked that you are including the modules in the right order. Do you always import the Group model file? If you are importing it too late, then the 'groups' attribute on User and Permission won't be available. On Sat, Dec 11, 2010 at 6:16 AM, Yohann REBATTU <[email protected]> wrote: > Hello, i'm trying to use the declarative way (recomanded for > sqlalchemy 0.5+) to set up a pylons model, and i'm stuck with a pretty > simple many to many relationship. > > The pylons doc ( > http://www.sqlalchemy.org/docs/orm/tutorial.html#creating-table-class-and-mapper-all-at-once-declaratively > ) doesn't describe this kind of relation, but redirect on sqlAlchemy > doc : ( > http://www.sqlalchemy.org/docs/orm/tutorial.html#building-a-many-to-many-relationship > ) > > this exemple works well in python console, but as i tryed it inside my > pylons model ( http://pastebin.com/gtL4Lec9 ) > sqlachemy complain about the group table doesn't exists (maybe > because, as seen in the doc, the Group object is placed after the > user_group_table declaration). > > > I just don't know why it works inside the console and not in my pylons > app. > > i'm using pylons 1.0 and sqlalchemy 0.6.5 (tried with 0.5.8 with same > results) > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/pylons-discuss?hl=en. > > -- Jonathan Gardner [email protected] -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
