Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » create_or_extend_Tables ddl generation issue(Attempts to create table when create_or_extend_Tables ddl generation)
icon4.gif  create_or_extend_Tables ddl generation issue [message #1053672] Tue, 07 May 2013 08:24 Go to next message
Panisha RN is currently offline Panisha RN
Messages: 33
Registered: May 2013
Member
I am using Eclipse link(2.4.0) with existing database.

I used the option create_or_extend_table option for ddl generation option as shown below.

<property name="eclipselink.ddl-generation" value="create-or-extend-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />

I could see Eclipse trying to create table again and fails as table is alredy existing in the database.

Can any one help me to solve the issue.
Re: create_or_extend_Tables ddl generation issue [message #1053766 is a reply to message #1053672] Tue, 07 May 2013 14:20 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1034
Registered: July 2009
Senior Member
Create statements should still be issued, with EclipseLink trying to update the table if the create fails. Are you seeing the tables not being updated?

Try turning on logging to fine or Finest to see the DDL that is issued.

Best Regards,
Chris
Re: create_or_extend_Tables ddl generation issue [message #1057788 is a reply to message #1053766] Wed, 08 May 2013 17:58 Go to previous messageGo to next message
Panisha RN is currently offline Panisha RN
Messages: 33
Registered: May 2013
Member
Hello Delahunt,

Once again thank you so much for your reply.

My application runs as expected.As i have to ensure the there is no side effect because to table creation fails(warning by eclipse link), i am little varied to release my sofware.

Tables are getting updated.

When we use create_or_extend_tables ddl generation option expected behaviour is if table is already exist make use of it. Why does warning message is thrown by EclipseLink.

I hope it is not having any impact on my software.

Regards
panisha
Re: create_or_extend_Tables ddl generation issue [message #1057789 is a reply to message #1053766] Wed, 08 May 2013 18:01 Go to previous messageGo to next message
Panisha RN is currently offline Panisha RN
Messages: 33
Registered: May 2013
Member
Tables are getting updated, but warning message is getting diaplyed where in i could see eclipse link is trying to create the table.

Does it have any side effect in the application which use eclipse link with existing database table
Re: create_or_extend_Tables ddl generation issue [message #1057792 is a reply to message #1057789] Wed, 08 May 2013 18:58 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1034
Registered: July 2009
Senior Member
As long as create table is failing because it exists, the messages can be ignored. EclipseLink issues the create statement as it is designed under the assumption that it is more common that the table does not exist. If it gets an exception, it then checks the metadata for the table and creates missing fields.

Turn your logging level to a higher setting to avoid having these messages show up in the logs. See http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging for information on logging settings.



Previous Topic:Foreign key constraint with create_or_extend_table is used
Next Topic:eclipseLink inheritance joined and oneToMany
Goto Forum:
  


Current Time: Sun Oct 26 08:37:33 GMT 2014

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

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