[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5427) derby 10.6.1.0 native sequence support broken

Max Giesbert (JIRA) noreply at atlassian.com
Tue Nov 2 14:46:48 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38989#action_38989 ] 

Max Giesbert commented on HHH-5427:
-----------------------------------

Thx for fixing this. 3.6.0 final has the fix included. Short question though: Now that Sequence support is added GenerationType.AUTO seems to choose Sequence. This breaks my database as I can not add any new entities (See http://opensource.atlassian.com/projects/hibernate/browse/HHH-5429 ). Any idea on the subject?

> derby 10.6.1.0 native sequence support broken
> ---------------------------------------------
>
>                 Key: HHH-5427
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5427
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.5.2, 3.5.3, 3.5.4, 3.6.0.Beta1
>         Environment: apache derby, hibernate 3.5.x/3.6
>            Reporter: Max Giesbert
>            Assignee: Steve Ebersole
>            Priority: Minor
>             Fix For: 3.6.0.Beta4
>
>   Original Estimate: 5m
>          Time Spent: 19m
>  Remaining Estimate: 0h
>
> see also: https://forum.hibernate.org/viewtopic.php?f=1&t=1005637&view=previous
> Derby 10.6.1 officially supports sequences. (See JIRA-Task: https://issues.apache.org/jira/browse/DERBY-712, Docs: https://issues.apache.org/jira/browse/DERBY-4568).
> usage (e.g. @Id @GeneratedValue(strategy=GenerationType.SEQUENCE) ) produces:
> org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not get next sequence value; nested exception is org.hibernate.exception.SQLGrammarException: could not get next sequence value
>    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:487)
>    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:430)
>    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> fix is: 
> org.hibernate.dialect.DerbyDialect needs to override getSequenceNextValString as follows
> @Override
> public String getSequenceNextValString(String sequenceName) {
>       return "values next value for " + sequenceName;
>    }

-- 
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