Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » ddl-generation
ddl-generation [message #485542] Sat, 12 September 2009 19:24 Go to next message
Marc Schlegel is currently offline Marc SchlegelFriend
Messages: 92
Registered: July 2009
Member
Hello again

In addition to my prior post, I have another problem with DDL generation.

When I use drop-and-create-tables I get an exception when the tables are not
available at drop time.
When I use create-tables I get an exception when the tables are already there.

Why is drop-and-create-tables not just ignoring it when there are no tables to
drop. Thats fine...it can continue with the creation. I dont want to change my
persistence.xml every time I run my testcases or drop tables in the database
manually.

Furthermore I get exception regarding a table called SEQUENCE (sometimes telling
me that it is missing, or that it is already there).

I guess I am doing something wrong in my top-down-approach. I know that in real
scenarios usually bottom-up is used, but right now I am just playing around how
to organize my object and how to map it...and currently EclipseLink seems to
have some problems with that.

Can somebody explain what I might do wrong or what I have to be aware of.
Thanks
Re: ddl-generation [message #485707 is a reply to message #485542] Mon, 14 September 2009 15:04 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Are you just seeing errors logged, or is an error occurring?

With drop-and-create EclipseLink will log errors if the drop fails, but will ignore the errors and try to create the tables, errors will only be thrown if the create fails.

With create EclipseLink will log errors if the create fails, but ignore the errors and assume the database is already created.

You can turn logging off, if you wish to not see the errors logged.
Sometimes they are useful, as a drop may have failed because of a constraint error.


James : Wiki : Book : Blog : Twitter
Previous Topic:TEST POLL: What database do you use?
Next Topic:MOXy - mapping enums
Goto Forum:
  


Current Time: Fri Apr 26 14:49:29 GMT 2024

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

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

Back to the top