Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Index on dynamic entities?
Index on dynamic entities? [message #1006492] Thu, 31 January 2013 08:52 Go to next message
Eclipse UserFriend
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 10:34 Go to previous messageGo to next message
Eclipse UserFriend
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)
Re: Index on dynamic entities? [message #1007522 is a reply to message #1007351] Wed, 06 February 2013 05:21 Go to previous messageGo to next message
Eclipse UserFriend
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 05:27] by Moderator

icon14.gif  Re: Index on dynamic entities? [message #1007562 is a reply to message #1007522] Wed, 06 February 2013 08:42 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 18:56:13 EDT 2025

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

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

Back to the top