Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » how to extend the DDL output (indexes, ..)
how to extend the DDL output (indexes, ..) [message #384364] Mon, 29 December 2008 09:51 Go to next message
Neuhauser Bernhard is currently offline Neuhauser BernhardFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

Is it possible to create indexes using EclipseLink?

I know that JPA 1 does not support Indexes, but as far as im aware of,
it should be part of JPA 2. In Hibernate it was possible using the
proprietary @Index annotation.

Whats best practice to create indexes or maybe also other RDBMS features
like triggers?

Or is the ddl generation output more like some kind of template which
will never see a production database?

regards,
Bernhard
Re: how to extend the DDL output (indexes, ..) [message #384367 is a reply to message #384364] Mon, 29 December 2008 12:49 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
Personally I think a database is more important that the mapping layer, so I never let it generate my tables; database first, mapping second. There are things, like triggers, that probably never will be supported through JPA (since the language dialects between databases differ way to much).

That said, I still hope that there will be a better trigger support on JPA level; the @PreSave annotation and friends have some issues.
Re: how to extend the DDL output (indexes, ..) [message #385168 is a reply to message #384364] Mon, 29 December 2008 14:29 Go to previous message
Gordon Yorke is currently offline Gordon YorkeFriend
Messages: 78
Registered: July 2009
Member
Specifing the index through annotation is not in the Public Draft of JPA
2.0 and I do not expect it to be part of the Specification. The only way
to specify index currently is to provide a "columnDefinition" to the
@Column annotation.
When designing a database one should consider the DDL generation of JPA to
be a helpful tool. DDL generation from JPA should not be considered a
replacement for thorough database design.

--Gordon
Previous Topic:Dali JPA Tools 2.1 now available for download
Next Topic:Converting from Hibernate composite-element mapping
Goto Forum:
  


Current Time: Fri Apr 26 15:15:47 GMT 2024

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

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

Back to the top