[appengine-java] Re: JPA and Scala
Hello Chris. I'm also interested in building a scala app on the Google App Engine. I have a simple working (empty) lift/scala template here: http://dl.getdropbox.com/u/1127092/lift4gaeTEMPLATE.zip But I haven't been able to cross the bridge from scala GAE app to wave robot. As I understand it there are examples of java wave robots floating around so I tried using their guidance Settings for bots: http://code.google.com/apis/wave/extensions/robots/ Java wave bot: http://www.vogella.de/articles/GoogleWave/article.html#robot Once I get this working I'll add it the code/how to information to this google wave: https://wave.google.com/wave/#restored:search:by%253Ame,restored:wave:googlewave.com!w%252BRz-PM7LmK On Oct 14, 1:02 am, chrislewis wrote: > Hi all, > > I've spent hours wrestling with getting some form of a working dev > environment for aScala(Lift) app on app engine. Gettingscalagoing > is cake, lift not much harder. The pain point is using the datastore. > Given the choice between JDO and JPA, I'm choosing JPA. After spending > hours getting a frankenbuild working, I'm now at issues with the > datastore that have me stumped. Using the following class, > successfully built and enhanced, appengine (under eclipse) throws the > following error when I try to merge() an entity: > > javax.jdo.JDOFatalInternalException: It's illegal to call > jdoCopyKeyFieldsToObjectId for a class with SingleFieldIdentity. > > The class: > > import javax.persistence._ > > @Entity > class Author { > > @Id > @GeneratedValue{ val strategy = GenerationType.IDENTITY } > var id: java.lang.Long = _ > > var name: String = _ > > } > > Can anyone shed some light on this? Thanks! --~--~-~--~~~---~--~~ 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-java@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 -~--~~~~--~~--~--~---
[appengine-java] Re: JPA and Scala
Hi, Chris, Scala is quite interoperable with Java. Wouldn't it make sense to write data objects in Java and use them from Scala? Or maybe wrap them into Scala classes to take advantage of Scala facilities? It is, of course, more work, but it will keep your design clean and should avoid any Datastore/Datanucleus complications. After all, you data object definitions are probably a tiny fraction of the rest of the application. Yegor On Oct 13, 11:02 pm, chrislewis wrote: > Hi all, > > I've spent hours wrestling with getting some form of a working dev > environment for a Scala (Lift) app on app engine. Getting scala going > is cake, lift not much harder. The pain point is using the datastore. > Given the choice between JDO and JPA, I'm choosing JPA. After spending > hours getting a frankenbuild working, I'm now at issues with the > datastore that have me stumped. Using the following class, > successfully built and enhanced, appengine (under eclipse) throws the > following error when I try to merge() an entity: > > javax.jdo.JDOFatalInternalException: It's illegal to call > jdoCopyKeyFieldsToObjectId for a class with SingleFieldIdentity. > > The class: > > import javax.persistence._ > > @Entity > class Author { > > @Id > @GeneratedValue{ val strategy = GenerationType.IDENTITY } > var id: java.lang.Long = _ > > var name: String = _ > > } > > Can anyone shed some light on this? Thanks! --~--~-~--~~~---~--~~ 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-java@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 -~--~~~~--~~--~--~---