Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Index on dynamic entities?
Index on dynamic entities? [message #1006492] Thu, 31 January 2013 13:52 Go to next message
khalil haddad is currently offline khalil haddadFriend
Messages: 12
Registered: November 2012
Junior Member
Hi!
Is there a way to create an index on a dynamic entity's field?
(like the @Index JPA annotation in a normal entity)
Re: Index on dynamic entities? [message #1007351 is a reply to message #1006492] Tue, 05 February 2013 15:34 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

How are you mapping the dynamic entity? Are you using DDL generation?

If you are mapping the entity through the orm.xml, then you can put an <index> in the orm.xml.
If you are mapping through code, then I believe you will need to use the schema framework directly in your code. (org.eclipse.tools.schemaframework)


James : Wiki : Book : Blog : Twitter
Re: Index on dynamic entities? [message #1007522 is a reply to message #1007351] Wed, 06 February 2013 10:21 Go to previous messageGo to next message
khalil haddad is currently offline khalil haddadFriend
Messages: 12
Registered: November 2012
Junior Member
I mapped my dynamic entities through code using the JPADynamicHelper.
Thanks for the response, I'll try to do this.

[Updated on: Wed, 06 February 2013 10:27]

Report message to a moderator

icon14.gif  Re: Index on dynamic entities? [message #1007562 is a reply to message #1007522] Wed, 06 February 2013 13:42 Go to previous message
khalil haddad is currently offline khalil haddadFriend
Messages: 12
Registered: November 2012
Junior Member
Actually, it was really easy!

builder.getType().getDescriptor().getTables().get(0).getIndexes().add(index);

builder instance of org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder
index instance of org.eclipse.persistence.tools.schemaframework.IndexDefinition


EclipseLink's implementation of Dynamic Persistence can be really useful, it would be nice if it was more documented.
Previous Topic:dbws utils generated war file gives error : _dbws.DBWSProvider is not available
Next Topic:OutOfMemoryError from JTASynchronizationListener
Goto Forum:
  


Current Time: Thu Apr 25 19:41:14 GMT 2024

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

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

Back to the top