[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1981) Id generation strategy effects constraint checking timing

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Mon Aug 7 06:37:18 EDT 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1981?page=all ]
     
Max Rydahl Andersen closed HHH-1981:
------------------------------------

    Resolution: Rejected

naturally - that is because the id strategy requires an insert to occur immediatly into the entity table to get the id.



> Id generation strategy effects constraint checking timing
> ---------------------------------------------------------
>
>          Key: HHH-1981
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1981
>      Project: Hibernate3
>         Type: Bug

>   Components: core
>     Versions: 3.1.3
>  Environment: Linux, PostgreSQL 8.1.4
>     Reporter: Emir Uner
>     Priority: Minor

>
>
> The id generation strategy affects the timing of the constraints checking.
> In our project, in a table there is a unique constraint for a column.
> When we specify "identity" id generation strategy the unique constraint
> viloation is detected as soon as we call saveOrUpdate.
> But if we specify "native" id generation strategy, (possibly results in
> "sequence" generator in PostgreSQL) the violation is not detected
> until a manual flush call is made or transaction commited.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list