Surrogate « Key « JPA Q&A





1. Hibernate Surrogate key??    coderanch.com

I have table A with Code and other fields and table B with Code, description and language. I want to associate these two table to show the Code and other fields from table A with description in user langugae from table B to the user. Now, the primary key in table B is composite, but not all the fields of B ...

2. Using both a surrogate and a natural key    forum.hibernate.org

The title of this post might sound a bit strange. Let me explain: I have two classes A and B, mapped to two tables, A and B. There is a many-to-one relation between the two (let's say that A owns the foreign key) Both entities have a surrogate primary key (say, a native generated key). Ok. Now, B has a column, ...

3. Surrogate key advocacy    forum.hibernate.org

Howdy folks, Our DBAs are getting a bit shirty about our Hibernate oriented schema design. The current issue is surrogate keys. Frankly, surrogate keys these days are an automatic design decision for me because I've been burned too many times when "things change". Even if I was writing the code by hand I'd still be asking for them. What I need ...

4. Proxy usage with Surrogate Keys    forum.hibernate.org

Hi All, Has any one used Hibernate with Surrogate Keys? I would like to know about the strategy about using the cache when using Surrogate Keys. In our application, the queries are primarily based on the business keys, we are not able to efficiently use the caching feature that hibernate privides. Younus

5. Surrogate key?    forum.hibernate.org

I have table A with Code and other fields and table B with Code, description and language. I want to associate these two table to show the Code and other fields from table A with description in user langugae from table B to the user. Now, the primary key in table B is composite, but not all the fields of B ...

6. many-to-many surrogate key    forum.hibernate.org

Hello, I'm trying to map an existing schema, my problem is the following: The class A is stored in table A with primary column APRIMARY. Collections of A are stored in table AS with column ASPRIMARY and foreign key column ASREF references A The class C references collection of A: there is a column CAS which references the column ASPRIMARY of ...

7. Business key Surrogate key    forum.hibernate.org

Hi to all, i have question about business key. I'm a little confuse about this concept. I have worked with old schema db always with composite id Now i'm to going to develop a new software, and i will use hibernate 3. In this day i'm reading about persitence and surrogate key and i have some question to post you: I ...

8. Best practice - updating object graphs with surrogate PK    forum.hibernate.org

Hi, I'm using Hibernate3 for persisting POJOs. Each object in the object graph has a surrogate key which is generated using one of the Hibernate ID generation policy. I'm frequently required to update complete object graphs recreated from a different source(and hence it does not have its surrogate(s)) to the DB. I'm wondering what is the best way to updated such ...

9. Surrogate keys    forum.hibernate.org





10. Basic Question:Objects uniqueness and surrogate keys    forum.hibernate.org

Hi, There is a basic problem which remains unclear to me. I plan to create a set of persistent classes mapped with a surrogate key (of type guid) as their primary key. I also have some uniqueness constraint that I would like to comply with. For instance, i have a Host class made unique by the "name" property. I don't want ...

11. Surrogate key for value type?    forum.hibernate.org

12. Question about using surrogate primary keys    forum.hibernate.org

Hello, So I have this table CLIENT, which has a surrogate PK called CLIENT_ID. Because CLIENT_ID is generated by the database, how can I prevent it from entering logical duplicates? I think the CLIENT_NAME is a good indicator for duplicates. Do I need to query now CLIENT_NAME every time I want to persist / merge? Because I dont have CLIENT_NAME as ...