[appengine-java] Re: Problem with persist a child class

2010-10-11 Thread Ian Marshall
Have you seen datanucleus-appengine issue 28 (Cannot add child to existing one-to-many if parent has Long or unencoded String pk)? Might this issue relate to your problem? I encountered this in the past and had to change the data type of the child persistent entity primary key to work around this

[appengine-java] Re: Problem with persist a child class

2010-09-25 Thread lisandrodc
Hi! I have tried delete my local_db and the problem persist. The exception is in the next code, in the call of the build method "RegFechaUsuario": ControladorFecha cF = new ControladorFecha(); System.out.println("nombre " + nuevaFecha.getNombre()); System.out.printl

Re: [appengine-java] Re: Problem with persist a child class

2010-09-25 Thread andy stevko
Hi Lisandro, Perhaps you didn't understand my last line of reasoning re: is your datastore empty... I suspect that the schema for your classes has migrated - i.e. a member that was Long and is now String or vice-versa A close read of the datastore docs says: http://code.google.com/appengine/docs/j

[appengine-java] Re: Problem with persist a child class

2010-09-25 Thread lisandrodc
Hi! Andy I can't change the type of a member from String to Long becasue it is an internal error of datanucleus in google apps, I I do not find way of solving it. All the exception is: Problem accessing /Prode/JugarFecha.action. Reason: java.lang.Long cannot be cast to java.lang.String Cause

[appengine-java] Re: Problem with persist a child class

2010-09-24 Thread lisandrodc
Yes Fernando, but if I delete the @PrimaryKey in RegFechaUsuario, the exception is Problem accessing /Prode/JugarFecha.action. Reason: java.lang.Long cannot be cast to java.lang.String Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String The child class

Re: [appengine-java] Re: Problem with persist a child class

2010-09-24 Thread Fernando O.
you don't need an aditional key your problem is that you already have a @PrimaryKey in Fecha so you don't need it in RegFechaUsuario. Cheers, Fernando On Thu, Sep 23, 2010 at 8:30 PM, lisandrodc wrote: > Hi!Cyrille I add a primary key in my child class: > > @PersistenceCapable(identityType = >

Re: [appengine-java] Re: Problem with persist a child class

2010-09-24 Thread Cyrille Vincey
Sorry, I did not see that your child class was inherited from another class. I tried using inheritance with JDO some times ago. Unsuccessfully : this is not supported by JDO yet. See http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/dataclasses. html#Inheritance On 24/09/10 01:3

[appengine-java] Re: Problem with persist a child class

2010-09-23 Thread lisandrodc
Hi!Cyrille I add a primary key in my child class: @PersistenceCapable(identityType = IdentityType.APPLICATION,detachable="true") public class RegFechaUsuario extends Fecha { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Pers

Re: [appengine-java] Re: Problem with persist a child class

2010-09-23 Thread Cyrille Vincey
There is no primary key in your child class. Add one. On 23/09/10 04:40, "lisandrodc" wrote: > Hi ! I have a problem when persist a chid class. > The parent class: > > @PersistenceCapable > > @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE) > public abstract class Fecha { > > @P

[appengine-java] Re: Problem with persist a child class

2010-09-22 Thread lisandrodc
Hi ! I have a problem when persist a chid class. The parent class: @PersistenceCapable @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE) public abstract class Fecha { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id;

[appengine-java] Re: Problem with persist a child class

2010-09-19 Thread lisandrodc
Hi, Cyrille but I have at the link for inheritance: http://code.google.com/intl/en/appengine/docs/java/datastore/relationships.html#Polymorphic_Relationships And I respect this. But I don“t understand since It me does not work in the mistake that I present in the first post, when instance the field

Re: [appengine-java] Re: Problem with persist a child class

2010-09-19 Thread Cyrille Vincey
Be aware that inheritance is not supported by GAE yet. The problem might come from this issue. See : http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/dataclasses. html cyrille On 19/09/10 18:55, "lisandrodc" wrote: > Thanks dushyant , but the exception is of an error of JDO,data

[appengine-java] Re: Problem with persist a child class

2010-09-19 Thread lisandrodc
Thanks dushyant , but the exception is of an error of JDO,datanucleus (seemingly). That it has to see with the keys it seems to me, is not the problem that I from my code can use "Long.parseLong(String) to parse". This is something internal that that should do datanucleus. Regards. Lisandro On 19