You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Kevin Sutter (JIRA)" <ji...@apache.org> on 2007/02/27 20:37:05 UTC

[jira] Resolved: (OPENJPA-139) PersistenceException merging an entity with a Calendar field.

     [ https://issues.apache.org/jira/browse/OPENJPA-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter resolved OPENJPA-139.
----------------------------------

    Resolution: Fixed

Code changed per Issue comments via SVN revision 505099.

> PersistenceException merging an entity with a Calendar field. 
> --------------------------------------------------------------
>
>                 Key: OPENJPA-139
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-139
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Michael Dick
>         Assigned To: Kevin Sutter
>
> I get the following exception when I try to merge an entity which contains a java.util.Calendar field. 
> <0|true|0.0.0> org.apache.openjpa.persistence.PersistenceException: mikedd.entities.CalendarEntity.cal
> 	at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:255)
> 	at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:131)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:236)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:97)
> 	at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3141)
> 	at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1128)
> 	at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:650)
> 	at mikedd.tests.TestCalendar.testMergeCalendar(TestCalendar.java:47)
>         <snip>
> I'm running the test in eclipse and my classpath probably isn't set up to properly display the openjpa version, 
> output from svnversion -c : 406193:505052M
> It looks like we're missing a case statement for JavaTypes.CALENDAR in org.apache.openjpa.kernelAttachStrategy.attachField. I added one under JavaTypes.DATE and that resolved the issue for me. 

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