JPA and MOXy

View: New views
4 Messages — Rating Filter:   Alert me  

JPA and MOXy

by RogerV :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've had my first attempt at using MOXy and have successfully generated a set
of .java classes from an .xsd file which are full of @XML Annotations that I'm
going to have to work on to understand.

Is it possible or even wise to add JPA @Entity annotations to my @XML
annotated classes so I can persist the classes and vice versa back to XML, or
would I be better off having a seperate set of @Entity classes and manually
move the data from one set to  the other?

Regards
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: JPA and MOXy

by Shaun Smith :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Roger,

   I'd do my JPA mapping with an orm.xml (or eclipselink-orm.xml) file. This way, you can recompile your schema without losing your JPA mappings.  Also, I'd use Dali to create my JPA mappings.  It provides UI to let you avoid hand coding the JPA xml mapping file.  And if you update your schema and break your JPA mappings Dali will detect the problems and give you errors.

    Shaun

Roger wrote:
I've had my first attempt at using MOXy and have successfully generated a set 
of .java classes from an .xsd file which are full of @XML Annotations that I'm 
going to have to work on to understand.

Is it possible or even wise to add JPA @Entity annotations to my @XML 
annotated classes so I can persist the classes and vice versa back to XML, or 
would I be better off having a seperate set of @Entity classes and manually 
move the data from one set to  the other?

Regards
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  

--
Oracle
Shaun Smith | Principal Product Manager
Phone: +19055023094
Oracle Server Technologies, Oracle TopLink
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga, Ontario | L5R 3P4

Green Oracle Oracle is committed to developing practices and products that help protect the environment



_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: JPA and MOXy

by RogerV :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 25 September 2009 16:26:44 Shaun Smith wrote:
> Hi Roger,
>
>    I'd do my JPA mapping with an orm.xml (or eclipselink-orm.xml) file.
> This way, you can recompile your schema without losing your JPA
> mappings.  Also, I'd use Dali to create my JPA mappings.  It provides UI
> to let you avoid hand coding the JPA xml mapping file.  And if you
> update your schema and break your JPA mappings Dali will detect the
> problems and give you errors.
>

Is Dali the tool behind the JPA Tools -->Generate Tables/Entities menu option?

Regards
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: JPA and MOXy

by Shaun Smith :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Roger wrote:
Is Dali the tool behind the JPA Tools -->Generate Tables/Entities menu option?
  
Yes.  All the JPA related tooling in the Web Tools Platform is developed in the Dali Java Persistence Tools project [1].  If you download the Eclipse for Java EE developers distribution Dali is included.

    Shaun

[1] http://www.eclipse.org/dali
Regards
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  

--
Oracle
Shaun Smith | Principal Product Manager
Phone: +19055023094
Oracle Server Technologies, Oracle TopLink
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga, Ontario | L5R 3P4

Green Oracle Oracle is committed to developing practices and products that help protect the environment



_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users