[
https://issues.apache.org/jira/browse/DERBY-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516735
]
Zied Hamdi commented on DERBY-712:
----------------------------------
Ok I'm happy it works:
using these annotations:
@Id
@GeneratedValue(strategy = TABLE, generator = "persistent_gen")
@TableGenerator(name = "persistent_gen", table = "persistent_key_gen",
pkColumnName = "seq_name",
valueColumnName = "seq_value", pkColumnValue =
"Persistence_seq", initialValue = 1, allocationSize = 1)
Regards,
Zied Hamdi
> Support for sequences
> ---------------------
>
> Key: DERBY-712
> URL: https://issues.apache.org/jira/browse/DERBY-712
> Project: Derby
> Issue Type: New Feature
> Components: SQL
> Environment: feature request
> Reporter: Tony Dahbura
>
> Would like to see support added for sequences. This would permit a select
> against the sequence to always obtain a ever increasing/decreasing value.
> The identity column works fine but there are times for applications where the
> application needs to obtain the sequence number and use it prior to the
> database write. Subsequent calls to the table/column would result in a new
> number on each call.
> SQL such as the following:
> SELECT NEXT VALUE FOR sequence_name FROM sometable ; would result in a next
> value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.