I'm sorry to report that we have not yet hooked in support for
ObjectStringConverter.  It shouldn't be too difficult though and I can
definitely see how it would be useful.  Please file an issue and we'll get
to it as soon as we can.

http://code.google.com/p/datanucleus-appengine/issues/list

Thanks,
Max
On Fri, Jan 8, 2010 at 3:47 PM, inetdevboy <inetdev...@gmail.com> wrote:

> I wrote a datanucleus javaTypes plugin (for joda-time LocalDate) based
> on the org.datanuclues.store.types.ObjectStringConverter interface.
> You probably know that this interface allows non-basic types to
> declare their ability to marshal themselves to/from a String
> representation for persistence.  In my case it'd be particularly
> helpful because the String representation's natural sort order matches
> the sort order of the class itself, so it'd be indexable.
>
> The datanucleus layer seems to find and register the plugin, because I
> get this FINE debug line when I include my plugin:
>
> Jan 8, 2010 8:47:42 PM org.datanucleus.store.types.TypeManager
> addJavaType
> FINE: Adding support for Java type org.joda.time.LocalDate
> (persistent=true, DFG=true, embedded=true)
>
> But when it tries to persist a field of type LocalDate I still get the
> following stack, with or without my plugin:
>
> java.lang.IllegalArgumentException: eventDate: org.joda.time.LocalDate
> is not a supported property type.
>        at
> com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue
> (DataTypeUtils.java:145)
>        at
> com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue
> (DataTypeUtils.java:127)
>        at
> com.google.appengine.api.datastore.Entity.setProperty(Entity.java:
> 280)
>        at
> org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField
> (DatastoreFieldManager.java:798)
>        at org.datanucleus.state.AbstractStateManager.providedObjectField
> (AbstractStateManager.java:1037)
>        at com.inetdevboy.model.Event.jdoProvideField(Event.java)
>        at com.inetdevboy.model.Event.jdoProvideFields(Event.java)
> [more]...
>
> I'd really like to avoid having to declare separate persistence fields
> with lifecycle listeners to accommodate every LocalDate field.  Is
> there a lever in the existing GAE implementation I haven't pulled to
> engage my plugin?
>
> BTW, I'm aware that there's an existing JodaTime datanucleus plugin,
> but it appears to require DataNucleus 2, and my implementation is
> essentially the same as theirs, just without the ORM support.
>
> Please help!
>
> [Using GAE SDK 1.3.0]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to