thanks a lot for your reply, but i found a way to do it almost completely. the problem now is about the collection which has data loaded in a previous session. i can set all attributes of the other instances (they are all new objects i'm going to insert in the DB). but when touching the data previously loaded, i get this:
Code:
Another object was associated with this id (the object with the given id was already loaded):
The collection is full of "lotes" instances. those instances where retrieved in a previous moment in my application flow. now i need to relate them whit new data i'm creating now, and update those "lotes".
what am I missing?
thanks