Re: [sqlalchemy] Automap and naming of relationship attributes

2014-02-06 Thread Adrian Robert
Well, using the mapper event would be nicer, but in any case I was already iterating over Base.classes and adding them to my own module's namespace like so: globals()[cls.__name__] = cls It works for the rest of my application being able to see the classes by importing the module, but

Re: [sqlalchemy] Automap and naming of relationship attributes

2014-02-06 Thread Michael Bayer
On Feb 6, 2014, at 1:56 PM, Adrian Robert adrian.b.rob...@gmail.com wrote: Well, using the mapper event would be nicer, but in any case I was already iterating over Base.classes and adding them to my own module's namespace like so: globals()[cls.__name__] = cls It works for the

Re: [sqlalchemy] Automap and naming of relationship attributes

2014-02-02 Thread Adrian Robert
Thanks, that works beautifully. I had noticed name_for_scalar_relationship parameter but I guess wasn't confident enough that I understood what was going on to try it. :-[ -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this

Re: [sqlalchemy] Automap and naming of relationship attributes

2014-02-01 Thread Michael Bayer
On Feb 1, 2014, at 11:50 AM, Adrian Robert adrian.b.rob...@gmail.com wrote: Hi, I'm new to sqlalchemy though I've used other ORMs (e.g. Hibernate) before, and I'm trying to use the new automap feature. However it seems to be using the foreign table name rather than a suffixed version