users@glassfish.java.net

Re: Relationship NOT marked cascade PERSIST

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Feb 2008 06:38:11 PST

Hello Russ,

The problem won't be with relationships that are set to null, but with relationships that are not marked cascade persist/merge but populated with non-managed entities. The error indicates that you have a managed object referencing an unmanaged entity over a relation that isn't marked to cascade, so you'll need to track down how you are persisting and relating your entities.

In the case of Asset, where are the assetType, manufacturer, tradePartner etc values coming from, and how are you persisting the Asset? If they are entities, be sure they are managed or that the relationships are marked with the appropriate cascade setting.

Best Regards,
Chris
[Message sent by forum member 'chris_delahunt' (chris_delahunt)]

http://forums.java.net/jive/thread.jspa?messageID=259912