Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Adding new column in an exsisting table(without deleting old table)
Adding new column in an exsisting table [message #698796] Wed, 20 July 2011 08:38 Go to next message
Sergei Jochim is currently offline Sergei JochimFriend
Messages: 6
Registered: July 2011
Junior Member
Hi All!!!

I want to add a new column to an exsisting table, through adding a new property to an entity. My hope is not to loose data and references in table.

with:
<property name="eclipselink.ddl-generation" value="create-tables" />

I can only add new tables, but cannot update exsisting.

Is there any possibilily except using extensions, because using extensions I have to drop and create tables?

wiki.eclipse.org/EclipseLink/Examples/JPA/Extensible

Re: Adding new column in an exsisting table [message #701860 is a reply to message #698796] Mon, 25 July 2011 17:29 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

EclipseLink does not support altering existing tables. You need to either re-create the schema (drop-and-create-tables), or write your own alter table scripts.

Please log an enhancement request for alter table support.


James : Wiki : Book : Blog : Twitter
(no subject) [message #701912 is a reply to message #698796] Mon, 25 July 2011 17:29 Go to previous message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
EclipseLink does not support altering existing tables. You need to either re-create the schema (drop-and-create-tables), or write your own alter table scripts.

Please log an enhancement request for alter table support.

--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/
Previous Topic:(no subject)
Next Topic:[JPA]
Goto Forum:
  


Current Time: Wed Nov 26 03:16:20 GMT 2014

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

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