Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] @GeneratedValue Question

Not sure where the descriptions are from, but they are the same thing.

To use a TableGenerator, just replace the propriety @GenericGenerator with
the JPA standard @TableGenerator(name="system-uuid").  You can optionally
set the name of the sequence table and column info.



Frans Thamura-2 wrote:
> 
> hi all
> 
> i just got this link
> 
> http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b28221/cmp30cfg001.htm#BCGDBFFA
> 
> and my @id implementation is look like this
> 
> @Id()
> @GeneratedValue(generator="system-uuid")
>  @GenericGenerator(name="system-uuid", strategy = "uuid")
>     public String getId() {
>         return id;
>     }
> 
> 
> and that is hibernate syntax
> 
> 
> our last dicsussion that the recommendation is to implement table
> generator
> 
> but i got
> 
> Generated Id Table
> 
> A database table that the container uses to store generated primary key
> values for entities. Typically shared by multiple entity types that use
> table-based primary key generation. Each entity type will typically use
> its
> own row in the table to generate the primary key values for that entity
> class. Primary key values are positive integers.
> 
> 
> Table Generator
> 
> A primary key generator, which you can reference by name, defined at one
> of
> the package, class, method, or field level. The level at which you define
> it
> will depend upon the desired visibility and sharing of the generator. No
> scoping or visibility rules are actually enforced. Oracle recommends that
> you define the generator at the level for which it will be used.
> This generator is based on a database tabl
> 
> 
> both table sequencing
> 
> 
> can give me the example of both case, when we use the table generator or
> generator id table
> 
> F
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/%40GeneratedValue-Question-tp17293935p17340709.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top