Hi Gul,The abstract class Calendar doesn't have a concrete add method either. It's the GregorianCalendar that implements the abstract method.
Are you saying you want a GregorianCalendar as the field type of your persistent Calendar? Have you tried declaring that as the field type?
And why don't you want the openjpa implementation of Calendar? Regards, Craig On Nov 22, 2007, at 9:44 AM, Gul Onural wrote:
We discovered a strange behavior about the usage of Calendar and I was wondering if this was expected : There is a Calendar field in one of our JPA objects. If I try to use this field through its getter method, the instance I got back is the open jpa implementation of the Calendar interface, not Sunimplementation (i.e. not java.util.Calendar). We discovered this when wetry to call "add" on this implementation which openjpa implementation doesn't support. We obviously do not want t use openjpa implementation of the Calendar in our code. I was wondering if it is the right behavior ? Shouldn't openjpa give java.util.Calendar back when it unserializes the Calendar field ? Gul
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
