[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Cascade.PERSIST marked List is not getting persited when Parent Object is persisted


I've got a strange Problem:

I have 3 Classes:

"Customer" contains a list of objects of type "Vendingmachine" and
"Vendingmachine" contains a list objects of "VendingmachineEvent".

Vendingmachine within Customer is marked "cascade=CascadeType.ALL",
VendingmachineEvent within Vendingmachine is marked

When i now add an Element to vendingmachine.lifecycleEvents by calling
lifecycleEvents.add(x) (where x is a Object of type VendingmachineEvent) it
doesn't get saved to the database when i call persist on Customer.

When in in contrast read all VendingmachineEvents before doing the persist
the Events get persisted to the Database as expected.

That seems very strange to me! Why do i have to read out the elements to
have them saved to the db?

Best regards,

View this message in context: http://www.nabble.com/Cascade.PERSIST-marked-List-is-not-getting-persited-when-Parent-Object-is-persisted-tp22717289p22717289.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.