Setting value of pushed objects foreign key attribute to the current one.
Changing way to get value of sequences.

For databases like Oracle when last inserted id doesn't works, query to get the
next sequence value to store it on the object. Warning: I still didn't test this
on a Oracle database, will make it later.