On Feb 19, 2010, at 11:55 AM, Kent wrote:

> In my example, there is only *one* table, employee.  Yes, dept would
> be a string column on "employee".
> 
> The catch is there is *no* department table.


but what does this mean then ?

department.dept = 'PAYROLL'
department.employees = [ empa, empb, empc ]

empa, empb, empc are mapped to "employee", correct ?     what is "department" ? 
 is that also a row in "employee" ?    or just a dummy object ?   if the 
latter, then no, merge() requires a mapped object as its argument, and you 
should create some kind of function that unwraps the ORM objects from your 
dummy "department" object and passes them to merge() with the desired state.

OTOH if the case here is, you'd like a string column on a mapped instance to 
spawn itself into some kind of object or collection, merge() has nothing to do 
with that, you'd implement that as a def on your class.


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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