08-10-05 10:45 PM
> I've patched the JDOImplHelper class to make the construct method
> static. There are no issues that I can think of to make this method
> static, so I'll change this.
>
> Does this help?
Hi Craig,
Thanks for looking into it. Referring to Michael's mail of the added=20
jdoCopyKeyFieldsFromObjectId() method, the error is at the end where it nee=
ds=20
to create a Date (or Locale, or Currency, or whatever) from the "oid". Is=20
construct() doing this ? or is it doing the reverse (I remember scanning=20
through it when you added ObjectIdentity and seeing the sort of parsing I=20
need to create an object from the oid, but may have been mistaken).
protected void jdoCopyKeyFieldsFromObjectId(Object oid)
=A0 =A0 =A0{
=A0 =A0 =A0 =A0 =A0if(!(oid instanceof ObjectIdentity))
=A0 =A0 =A0 =A0 =A0{
=A0 =A0 =A0 =A0 =A0 =A0 =A0throw new ClassCastException("key class is not =
=20
javax.jdo.identity.ObjectIdentity or null");
=A0 =A0 =A0 =A0 =A0} else
=A0 =A0 =A0 =A0 =A0{
=A0 =A0 =A0 =A0 =A0 =A0 =A0ObjectIdentity o =3D (ObjectIdentity)oid;
=A0 =A0 =A0 =A0 =A0 =A0 =A0id =3D new Date(o.getKey());
=A0 =A0 =A0 =A0 =A0 =A0 =A0return;
=A0 =A0 =A0 =A0 =A0}
=A0 =A0 =A0}
=2D-=20
Andy
[ Post a follow-up to this message ]
|