No opinions at all? Does it look like that I'm doing the right thing?
I just found out that it also doesn't work for a list of integers, possibly 
any collection of any simple type:

@ElementCollection
@Extension(vendorName = "datanucleus", key = "gae.unindexed", value = "true")
//private List<PositioningType> bestPositionings = new 
ArrayList<PositioningType>();
private List<Integer> bestPositionings;


Results in:

Caused by: org.datanucleus.exceptions.NucleusUserException: The MetaData for 
the element class "java.lang.Integer" of the collection field 
"com.olympya.datamodel.model.Player.bestPositionings" was not found.
at 
com.google.appengine.datanucleus.scostore.AbstractFKStore.<init>(AbstractFKStore.java:120)
at 
com.google.appengine.datanucleus.scostore.FKListStore.<init>(FKListStore.java:83)
at 
com.google.appengine.datanucleus.DatastoreManager.newFKListStore(DatastoreManager.java:472)
at 
org.datanucleus.store.mapped.MappedStoreManager.getBackingStoreForCollection(MappedStoreManager.java:798)
at 
org.datanucleus.store.mapped.MappedStoreManager.getBackingStoreForField(MappedStoreManager.java:709)
at org.datanucleus.store.types.sco.backed.ArrayList.<init>(ArrayList.java:99)


:(

Em quarta-feira, 29 de agosto de 2012 13h46min03s UTC-3, roberto_sc 
escreveu:
>
>
> I'm moving from JPA 1 to JPA 2 in my Gooogle App Engine project, and for 
> that I changed the annotations for collections of enums, like this case:
>
> //  @OneToMany(cascade = CascadeType.ALL) // JPA 1
>     @ElementCollection(targetClass=PositioningType.class)
>     private List<PositioningType> bestPositionings;
>
>
> PositioningType is an enum that is not annotated.
>
> That code is giving me the following exception:
>
> javax.persistence.PersistenceException: The MetaData for the element class 
> "com.olympya.datamodel.model.PositioningType" of the collection field 
> "com.olympya.datamodel.model.Player.bestPositionings" was not found.
> at 
> org.datanucleus.api.jpa.NucleusJPAHelper.getJPAExceptionForNucleusException(NucleusJPAHelper.java:302)
> at 
> org.datanucleus.api.jpa.JPAEntityTransaction.commit(JPAEntityTransaction.java:122)
> at com.olympya.Services.mergeUser(Services.java:102)
> ...
> Caused by: org.datanucleus.exceptions.NucleusUserException: The MetaData for 
> the element class "com.olympya.datamodel.model.PositioningType" of the 
> collection field "com.olympya.datamodel.model.Player.bestPositionings" was 
> not found.
> at 
> com.google.appengine.datanucleus.scostore.AbstractFKStore.<init>(AbstractFKStore.java:120)
> at 
> com.google.appengine.datanucleus.scostore.FKListStore.<init>(FKListStore.java:83)
> at 
> com.google.appengine.datanucleus.DatastoreManager.newFKListStore(DatastoreManager.java:472)
> at 
> org.datanucleus.store.mapped.MappedStoreManager.getBackingStoreForCollection(MappedStoreManager.java:798)
> at 
> org.datanucleus.store.mapped.MappedStoreManager.getBackingStoreForField(MappedStoreManager.java:709)
> at org.datanucleus.store.types.sco.backed.ArrayList.<init>(ArrayList.java:99)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> ...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/M9bihLLrsTAJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to