Id for oracle.rowid?

Mapping a ROWID as Id isn't supported by standard JPA and I couldn't find any obvious proof that EclipseLink is providing an extension for this (I only found this message ).

Mapping a ROWID as Id isn't supported by standard JPA and I couldn't find any obvious proof that EclipseLink is providing an extension for this (I only found this message). But this is not your only option and the JPA wikibook has a good paragraph about this situation: No Primary Key Sometimes your object or table has no primary key. The best solution in this case is normally to add a generated id to the object and table.

If you do not have this option, sometimes there is a column or set of columns in the table that make up a unique value. You can use this unique set of columns as your id in JPA. The JPA Id does not always have to match the database table primary key constraint, nor is a primary key or a unique constraint required.

If your table truly has no unique columns, then use all of the columns as the id. Typically when this occurs the data is read-only, so even if the table allows duplicate rows with the same values, the objects will be the same anyway, so it does not matter that JPA thinks they are the same object. The issue with allowing updates and deletes is that there is no way to uniquely identify the object's row, so all of the matching rows will be updated or deleted.

If your object does not have an id, but its' table does, this is fine. Make the object and Embeddable object, embeddable objects do not have ids. You will need a Entity that contains this Embeddable to persist and query it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions