> -----Original Message----- > From: Michael Dick [mailto:[email protected]] > Sent: Monday, July 18, 2011 10:16 > To: [email protected] > Subject: Re: Perfered way to convert JPA2 annotations to a > persistence.xml based mapping file? > > If the tables have already been created you can use OpenJPA's > reverse mapping > tool<http://openjpa.apache.org/builds/latest/docs/manual/manua > l.html#ref_guide_pc_reverse>. > It will recreate the .java files for you in addition to the > XML mapping file. There's no need to use the generated .java > files though.
Rather the Entities have already been made, using annotations and now it is needed in XML. > > If you don't have the tables created, you could use the > OpenJPA forward mapping tool > <http://openjpa.apache.org/builds/latest/docs/manual/manual.ht > ml#ref_guide_mapping_mappingtool>to > create the temporary database. Then use the reverse mapping > tool to create the XML file. > > I'm not aware of a tool that writes the XML mapping files > without going to a database, but this should at least get you started. Unfortuanatly, it is not the issue at hand. So I will continue by hand. > > On Sun, Jul 17, 2011 at 8:34 PM, Jason Pyeron > <[email protected]> wrote: > > > What is the perfered way to convert JPA2 annotated entities > to an XML > > mapping file? > > > > We are using openjpa 2.1. > > -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.
