Hi,

thank you so much for the quick reply. That's exactly what I need!

FYI: I use  '*' with joinedload for the following scenario:

I want to export a certain object and all its related objects to a second 
sqlite database. In addition to the db file I also copy files from disk, 
which are referenced by certain db objects.
The sql and data files are packed into a zip to be transfered to another 
client, that imports it.
To do so, I create a new session and query the root object with 
joinedload('*') to have all related objects in the session, so I can do 
this:

objs = []
# store all session objects
for o in session:
    objs.append(o)
# expunge objects from session
for o in objs:
    orm.session.make_transient(o)
# add objects to session connected to second db with same metadata
exportSession.add_all(objs)
exportSession.commit()
exportSession.close_all()

best regards and a big praise for your work on sqlalchemy :D
alex

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/_RONPI3aMWwJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to