openjpa « ID « JPA Q&A

1. OpenJPA HSQLdb - how to handle IDs

I'm having trouble handling IDs of my databse tables using OpenJPA and HSQLdb. I created an Abstract class where I handle annotations and stuff to remap into the DB:

// Property accessors

2. How to inject custom object ids into JPA entities

I am using JPA 2 for an enterprise application, and my DBA's just hit me with a twist. They want me to use the group's centralized object ID generator for all my ...

3. OpenJPA not numerical Id

Is it possible to have a String Id in OpenJPA? When I look at the documentation, it look's like it's possible, but when I try, I get this exception :

the given ...

4. The id of an object retrieved by JPA is missing

I have a simple object with an integer id field as followings:

@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(unique = true, nullable = false)
private int id;
Objects can be persisted into database correctly. However, when retrieving object ...