Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » DDL & DTO
DDL & DTO [message #1769131] Wed, 26 July 2017 21:57 Go to next message
Anthony Levesque is currently offline Anthony LevesqueFriend
Messages: 3
Registered: May 2017
Junior Member
Hello,

I am using DDL with the "create" option in order to create dynamic databases for customers. However, I have several entities that are Data Transfer Objects that I mark as @Entity to fill them but that I do not want to generate.

How can I achieve that ?

Thanks in advance.
Re: DDL & DTO [message #1769281 is a reply to message #1769131] Fri, 28 July 2017 14:04 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1275
Registered: July 2009
Senior Member
Use a separate persistence unit that mirrors your runtime persistence unit, and only stick the entities you want for DDL generation, and use this once upfront for DDL generation then close it and don't touch it again. Another alternative is to generate the SQL script, and then edit out the tables created from your DTO objects - see https://antoniogoncalves.org/2014/12/11/generating-database-schemas-with-jpa-2-1/ on JPA 2.1 features for having JPA execute those scripts for you at runtime.

Previous Topic:DDL & MySQL & Primary Key
Next Topic:Setting up cache coordination with Payara
Goto Forum:
  


Current Time: Thu Dec 14 04:23:28 GMT 2017

Powered by FUDForum. Page generated in 0.01937 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software