Skip to main content

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

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

Back to the top