Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » add column in a table
add column in a table [message #630403] Fri, 01 October 2010 21:44 Go to next message
vicenrico  is currently offline vicenrico
Messages: 2
Registered: October 2010
Junior Member
Hello everybody.
This is the first time i use eclipselink and i would like to know if i this plus JPA can create automatically a column into the database.
I mean:

class persona{
int id;
String name;
}

etc...(i haven't set the @stuff)

I want to know, if i modify this class (for, example adding a new field, eclipselink+JPA will modify my table or i have to use "alter table" methods.

I tried to do, but i'm receiving :
"Column DNI not found; SQL statement:" error.
Re: add column in a table [message #630556 is a reply to message #630403] Mon, 04 October 2010 06:05 Go to previous message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
AFAIK you can instruct JPA to automatically create tables, modifying I'm not sure. But personally I think databases are way to important to have them simply created by a library; I prefer using explicit SQL statements, so fields can be properly initialized, if required. If anything I'd use a library like liquibase.

Tom



On 1-10-2010 23:44, vicenrico wrote:
> Hello everybody.
> This is the first time i use eclipselink and i would like to know if i this plus JPA can create automatically a column into the database. I mean:
>
> class persona{
> int id;
> String name;
> }
>
> etc...(i haven't set the @stuff)
>
> I want to know, if i modify this class (for, example adding a new field, eclipselink+JPA will modify my table or i have to use "alter table" methods.
>
> I tried to do, but i'm receiving :
> "Column DNI not found; SQL statement:" error.
Previous Topic:EclipseLink JPA2.0 orm table name prefix help
Next Topic:Compatibility of TABLE_PER_CLASS inheritance strategy with composite keys
Goto Forum:
  


Current Time: Fri Oct 24 15:32:51 GMT 2014

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

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