Well, this is definitely something that needs more work. I've been trying to put together an archetype for a JPA-based Lift app but I haven't had time to do that yet. One of the main reasons that the persistence entities are split out from the main webapp is that that's how JPA would prefer you package everything. When the JPA layer loads, it scans every JAR in the classpath to see if there's a META-INF/persistence.xml. If so, it loads that JAR as a persistence module. There are ways to have a persistence module not rely on the JAR packaging by explicitly listing the entities in the persistence.xml, so you could do that if you'd prefer. My goal is to make this as simple as possible but I haven't had a lot of time to work on that aspect. If David's OK with it I can put the ScalaEntityManager and ScalaQuery into their own package (maybe under net.liftweb.jpa or net.liftweb.mapper.jpa) so that you only need to provide the concrete impls.
Derek On Fri, Oct 24, 2008 at 10:30 AM, Tim Perrett <[EMAIL PROTECTED]> wrote: > > Cheers guys, one thing though that confusses me about Dereks' JPA > example is why the JPA stuff wasn't consolidated into the lift > project? > > For instance, I understand why you might well want or need a separate > persistence tier in some applications or environments, but for the > majority of arbitrary applications, it seems to just make things more > complex / lengthy as you need to do "mvn install" all the time after > any updates. So far, having it consolidated seems to be going very > well 8-) > > Also, IMO, the Model.scala and JPA.scala should really have the > majority of there functionality taken out and put into the lift master > under say, net.liftweb.jpa.Helpers or something? It appears that the > functionality is so generic im copying and pasting a lot of the time > those files into different project :-( > > Cheers > > Tim > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
