openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Rak (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1422) Cannot use @Embeddable as @MapKey
Date Wed, 09 Dec 2009 02:24:18 GMT


Richard Rak commented on OPENJPA-1422:

Here is the stack trace when executing the given test case on 1.2.1:

<openjpa-1.2.1-rexported nonfatal user error> org.apache.openjpa.persistence.InvalidStateException:
Encountered unmanaged object in persistent field "org.apache.openjpa.persistence.jdbc.maps.embeddedkey.Folio.folioItems<key:class
org.apache.openjpa.persistence.jdbc.maps.embeddedkey.FolioItemPK>" during flush.  However,
this field does not allow cascade persist. Set the cascade attribute for this field to CascadeType.PERSIST
or CascadeType.ALL (JPA annotations) or "persist" or "all" (JPA orm.xml), or enable cascade-persist
globally, or manually persist the related field value prior to flushing. You cannot flush
unmanaged objects or graphs that have persistent associations to unmanaged objects.
FailedObject: org.apache.openjpa.persistence.jdbc.maps.embeddedkey.FolioItemPK@213c2d7f
	at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(
	at org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(
	at org.apache.openjpa.kernel.SingleFieldManager.preFlush(
	at org.apache.openjpa.kernel.SingleFieldManager.preFlush(
	at org.apache.openjpa.kernel.SingleFieldManager.preFlush(
	at org.apache.openjpa.kernel.StateManagerImpl.preFlush(
	at org.apache.openjpa.kernel.PNewState.beforeFlush(
	at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(
	at org.apache.openjpa.kernel.BrokerImpl.flush(
	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(
	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(
	at org.apache.openjpa.kernel.LocalManagedRuntime.commit(
	at org.apache.openjpa.kernel.BrokerImpl.commit(
	at org.apache.openjpa.kernel.DelegatingBroker.commit(
	at org.apache.openjpa.persistence.EntityManagerImpl.commit(
	at org.apache.openjpa.persistence.jdbc.maps.embeddedkey.TestEmbeddedMapKey.testEmbeddedMapKey(

> Cannot use @Embeddable as @MapKey
> ---------------------------------
>                 Key: OPENJPA-1422
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.2.1
>         Environment: Linux x64
>            Reporter: Richard Rak
>         Attachments:,,,,
> Executing the attached test case fails on OpenJPA 1.2.1, however, it succeeds on trunk.
 I have not tested 1.3.0.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message