Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependecy liberty-target provides JPA 2.0 support instead of JPA 2.1 #15

Open
mindej opened this issue Nov 22, 2016 · 1 comment
Open

Comments

@mindej
Copy link

mindej commented Nov 22, 2016

Hello, I am using Liberty 16.0.0.3, and currently, I have a problem with JPA.

I need to add nonunique index to my table

@Entity
@Table(name = "DETAILS"  )
public class DetailsDAO { ... }

According to JPA 2.1 ( which in my server.xml I am and using <feature>jpa-2.1</feature>) I should be able to use Index annotation but can not set variable index in Table annotation.

The dependency tree is like this:
screen shot 2016-11-22 at 13 38 59

Tabe annotation is code is:
screen shot 2016-11-22 at 13 39 37

My maven configuration:

<dependency>
   <groupId>net.wasdev.maven.tools.targets</groupId>
   <artifactId>liberty-target</artifactId>
   <version>16.0.0.3</version>
   <scope>provided</scope>
   <type>pom</type>
</dependency>

Here is reference:
https://stackoverflow.com/questions/3405229/specifying-an-index-non-unique-key-using-jpa

https://www.ibm.com/support/knowledgecenter/was_beta/com.ibm.websphere.wdt.doc/topics/localrepo.htm

@rajivsen
Copy link
Contributor

Hello,

Can you clarify what problem you are seeing when you try to set the variable index in the Table annotation? Do you see any errors?

I was able to create a simple test project using the same maven dependency you have above and set the indexes similar to the reference you provided and do not have any errors.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants