column « Eclipse « JPA Q&A





1. How to handle many-to-many link tables with additional columns    stackoverflow.com

Assume the following exemplary DB-Design:

USERS
-----------------
ID
NAME


ROLES
-----------------
ID
NAME


USERS_ROLES
-----------------
FK_USER_ID
FK_ROLE_ID
LOGIN
PASSWD
I map this relation with eclipse-link using xml. The users:
<many-to-many name="roles" mapped-by="users">
  <join-table name="USERS_ROLES">
    <join-column name="USER_ID" />
    <inverse-join-column name="ROLE_ID" />
  ...

2. JPA - Setting entity class property from calculated column?    stackoverflow.com

I'm just getting to grips with JPA in a simple Java web app running on Glassfish 3 (Persistence provider is EclipseLink). So far, I'm really liking it (bugs in netbeans/glassfish interaction ...

3. JPA/EclipseLink - Calculated column    stackoverflow.com

I'm trying to learn JPA. I created a simple entity class. This entity has 3 columns: ID, NAME, NUMBER_A. It's working fine: I can persist, update and delete without problems. What I'm ...

4. Should I specify names via @Column and @Table always or only when necessary    stackoverflow.com

This is more of a question of best practice, hoping to learn from others experiences. Would you recommend always specifying the names of columns and tables explicitly using @Column(name=) and ...

5. Generated JPA insert has same column twice    stackoverflow.com

A cascade merge - generates insert query with column recCrtTS showing twice - causing the SQL server db to error out on the parent table. I cannot figure out where ...