On 5/2/12 6:24 PM, Charles Brunet wrote:
> My problem is that it performs commits at each row, instead of one big
> commit at the end of the importation.I tried to remove the save() in the
> loop, but then it set Attribute.Contact to a negative ID, which is wrong.

The negative id is only temporary. Take the save() out of the loop, and move it 
to 
the end. When save() is called, all the temporary (negative) id's will get 
filled 
from the backend, including the foreign keys in the child table.

Actually, that's how it should work but now that I think about it I'm not sure 
it 
actually works that way. Personally, I generate UUID's for my PK's at the dabo 
layer 
instead of delegating it to the db.

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to