[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eclipselink-users] Can I use a ROWID column as a primary key?
- From: James Sutherland <jamesssss@xxxxxxxxx>
- Date: Thu, 14 Aug 2008 06:33:50 -0700 (PDT)
- Delivered-to: email@example.com
In general I would not recommend trying to use a ROWID as a primary key.
Although I'm not sure why your example is not working, it seems JDBC does
not like to ROWID being bound back. You may wish to experiment with raw
JDBC to find something that will work, then try configuring that in
EclipseLink. You may be able to map to the attributes of the XML document
and declare one of those as the primary key. You could also try defining
the XMLType as the primary key, although you would still not be able to
EclipseLink does support the Oracle XMLType, but only as a column type, not
as a table. You may wish to log this enhancement request. Do you intend to
map the XML to an object, or do you just want the XML? I would recommend
you add a normal table that has a generated sequence id and a column for the
> I mean can I use a ROWID column as a primary key instead of real column
> which is sequenced in case I have not a primary key column in my table?
> I work with xmldb object tables so I can not add extra columns.
> Is it possible to retrieve into a bean's attribute the value of ROWID for
> the record which was inserted while executing of the EntityManager's flush
> I use Oracle DB of course.
> Maybe I can implement a custom stored procedure which returns a ROWID
> value ane set this procedure by
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
View this message in context: http://www.nabble.com/Can-I-use-a-ROWID-column-as-a-primary-key--tp18980847p18981603.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.