Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] DALI : How to Map Existing POJO to Tables

Hi,

This question is better suited for the newsgroup so everyone will see the answer, but here is a quick pointer and a response for you.  First, take a look at some project configuration comments here - http://www.eclipse.org/newsportal/article.php?id=301&group=eclipse.technology.dali#301.

The options you mention are not currently available in the WTP 2.0 stream, and the documentation you are looking at only applies to 0.5.  To configure your Entities in Dali 1.0 (WTP 2.0), make sure you have done the steps above in the newsgroup post and then open the JPA Perspective.  From here you can make any existing Java class an Entity via the JPA Details view.  To create a new Entity, just create a new Java class and use the Details view "Map As:" selection to make it an Entity. 

We should have updated documentation posted shortly.

Neil

--- Original Message ---
> 
> Hi, 
> 
> I have installed the latest build of WTP with all the Required
> Projects. 
> I can create a new JPA Project, and add new Class. If I add a
> marker @Entity
> to the Class, it brings the JPA Mapping Window.
> 
> My Question is how to mapping an Existing Entity or Create a
> new Persistence
> Entity. The Options described below don't appear in my
> Environment
> - Package Explorer->New -> Other -> Java Persistence -> Entity
> 
> - Right-click on your Class in the Package Explorer and choose
> Persistence
> -> Make Java Persistence Entity
> 
> Is this a configuration Issue, or have these two options been
> dropped in the
> 2.x version of WTP/Dali/JPA
> 
> Please help!!
> 
> =================================================================
> To create a new persistent Entity:
> 
>     * Right-click on your Java Project and choose New -> Other
> -> Java
> Persistence -> Entity
>     * Or, you can create a new Java class and simply add the
> "@Entity"
> annotation to it. The Dali tools will pickup the change and
> the editing
> views will activate. 
> 
> To make an existing POJO an Entity:
> 
>     * Right-click on your Class in the Package Explorer and
> choose
> Persistence -> Make Java Persistence Entity
>     * Or simply add the "@Entity" annotation to any existing
> POJO class
> definition. The Dali tools will pickup the change and the
> editing views will
> activate.
> ==================================================================
> 
> -- 
> View this message in context:
> http://www.nabble.com/DALI-%3A-How-to-Map-Existing-POJO-to-Tables-tf3377329.html#a9399812
> Sent from the Eclipse WTP - general mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> wtp-dev mailing list
> wtp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/wtp-dev



Back to the top