Re: [sqlalchemy] Delete fails using automap with joined inheritance

2014-03-28 Thread Adrian Robert
Thank you sir, that resolved it, and in record time! On 2014.3.28, at 16:51, Michael Bayer wrote: > > On Mar 28, 2014, at 1:15 AM, Adrian Robert wrote: > >> I have been using the automap extension with postgres, with an inheritance >> structure using the joined i

[sqlalchemy] Delete fails using automap with joined inheritance

2014-03-27 Thread Adrian Robert
I have been using the automap extension with postgres, with an inheritance structure using the joined inheritance pattern. I could not figure out a way to have this reflected from the DB so I define the classes for this part of my schema explicitly, and when automap initializes, these classes g

Re: [sqlalchemy] Automap and naming of relationship attributes

2014-02-06 Thread Adrian Robert
_9/orm/events.html#sqlalchemy.orm.events.MapperEvents.instrument_class > > > > On Feb 6, 2014, at 4:32 AM, Adrian Robert wrote: > >> One other point, I was trying out the dogpile cache example and ran into >> (after I stuck a ".encode('utf-8')" into the key

Re: [sqlalchemy] Automap and naming of relationship attributes

2014-02-06 Thread Adrian Robert
iled This was fixed by a hack sqlalchemy.ext.automap.__dict__[cls.__name__] = cls run over all the automap-created classes. It might be I'm only having to do this because I'm doing something wrong elsewhere, but I just thought I'd mention it in case it comes up for someone.

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

[sqlalchemy] Automap and naming of relationship attributes

2014-02-01 Thread Adrian Robert
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 of the column name when naming relationships. Is there a reason for doing it this wa