On Aug 1, 9:45 pm, Gabriel Cote <[EMAIL PROTECTED]> wrote:
>
> >From what I understand of the documentation, I should be able to do
>
> this using different entity names for the different mappers. Or is it
> that once an object has been committed to the db using a certain
> entity name, it can only be manipulated with this same entity name?
>

the only real problem with the above is that your second two mappers
are uncompiled.  this because you create them but don't reference them
in any way, and also because your usage of the mapped classes, which
also triggers a compile, precedes their creation so they didn't get
compiled there either.  either define them up above or just say
"compile_mappers()" and you're a go.

also, when an object is saved to the session with a particular entity
name (or loaded with that mapper), its got an "_entity_name" attribute
which marks it as linked to that mapper.  if you want to switch the
entity name around you can use obj = session.merge(obj,
entity_name=<newname>).


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to