database « ID « JPA Q&A





1. How to point to other table's ID with hibernate?    stackoverflow.com

The problem: let's say I have two tables Client, and Product, in which Client has its primary key and a column called products (that points to pk's in Product table)... ok, ...

2. Hibernate assigning incorrect database ID's    stackoverflow.com

Here's the situation: I have a mapping table, let's call it SecurityContact, with three columns.

  1. The first column(let's call it security_id) contains the primary key for SecurityContact. Hibernate successfully auto-generates an ID ...

3. Copy generated id's from one db to another.    forum.hibernate.org

4. Database That Uses ID Tables    forum.hibernate.org

The current project that I'm working on is taking an existing fat-client application and starting to move it's functionality to the web. One of the requirements is that I have to use the existing database. This database was originally designed in 1997 and with the exception of tables being added has changed very little since then. That being said, it does ...

5. Implementing a db-based queue, details of id generation    forum.hibernate.org

Hibernate version: 2.1 For a certain db application where we keep a queue of tasks to process in a table, we have traditionally used sql server's timestamp value as a guaranteed increasing, automatically generated binary key. (note: sql server's timestamp value is not the same as a standard SQL timestamp value) This allows us to treat the table as a queue, ...

7. Determine Id generation strategy from DB dialect?    forum.hibernate.org

I need to support different DB products, some of which support identity columns, while others don't. I would like to configure the id columns to use identity generatior if the DB supports it, otherwise use sequence. Is there any other way better than doing build-time token replacement on the mapping files? On top of that, if I were to migrate to ...

8. Can I access ref'd object's db id w/o db access?    forum.hibernate.org

Since no one replied, I thought I'll ask again, perhaps sheding some more information about the use case I have. The application all this applies to is a a typical n-tier with the Hibernate application being remote from the clients. The object model is a rather interconnected object graph. When issuing a query for whatever domain model objects, in 95% of ...

9. Problem generating automatic ID - hibernate to postgres db    forum.hibernate.org

Hi, Im trying to insert a new object (user) using hibernate and a postgresql server. As seen on examples, I tried to make the id SERIAL in the postgres database, but was not allowed to do this operation. I changed it to integer with the following parameter: nextval('public."Users_userid_seq"'::text) The hibernate mapping file did NOT include the tag then. However, ...





10. Can you leave ID generation to Database    forum.hibernate.org

Hibernate version: 3.1 Name and version of the database you are using: Ingres II 3 Hi Hibernators, Basically i want to set Hibernate to leave all the key generation to the database entirely (i want the scope to be able to insert rows outside of Hibernate and have valid ids generated for them). I've lookedaround and found the PostInsertGenerator abstract that ...

11. how to check the id already exists in database    forum.hibernate.org

Hi I have table with 3 columns id , name , password where id is incremented automatically . During me insert operation i must check wheather the id ie already exists in the table r not . If yes i must allow him to save it to database . How i do this in hibernate help me bye mano

12. hibernate.id vs normalized databases    forum.hibernate.org

Hi, I am about to start writing my master's project and I have first solid dilema. I have a choice 1. create as normalized db as it is possible, using multiple primary keys and complitated hibernate composite keys. The advantage - well designed database. 2. create java classes extending base model with hibernate.id and set it as primary key in each ...

13. Setting initial id value in database    forum.hibernate.org

14. Requesting design feedback on generated ID's and multiple db    forum.hibernate.org

We are in the midst of restructuring our backend to utilize Hibernate and replace our current POJO structure (currently this is just a straight up call to various stored procedures). We have multiple RDBMS's to support and my main concern at the moment is determining the best method for handling generated ID's. Our main two platforms are SQL Server and DB2 ...