[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3454) Allow enhanced.TableGenerator to segment itself per entity as default

Drew Kutcharian (JIRA) noreply at atlassian.com
Thu Nov 13 03:54:16 EST 2008


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

Drew Kutcharian commented on HHH-3454:
--------------------------------------

I don't think prefer_entity_table_as_segment_value works with Hibernate Annotations. 

In my entity I have:
@Id
@GenericGenerator(name = "idGenerator", strategy = "org.hibernate.id.enhanced.TableGenerator", parameters = {
		@Parameter(name = "optimizer", value = "pooled"), @Parameter(name = "initial_value", value = "1"),
		@Parameter(name = "increment_size", value = "10"), @Parameter(name = "prefer_entity_table_as_segment_value", value = "true") })
@GeneratedValue(generator = "idGenerator")
@Column(name = "id")
private Integer				id					= null;

But in the hibernate_sequences table, there's only one row with name "default" and all the entities use the next_val of that.

Please advise if you want a JIRA separate issue for this.

Thanks,

Drew


> Allow enhanced.TableGenerator to segment itself per entity as default
> ---------------------------------------------------------------------
>
>                 Key: HHH-3454
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3454
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.3.0.SP1
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.2.x, 3.3.1, 3.4
>
>
> Currently TableGenerator use a static string ("default" ) for its default segment column name.  The implication is that all TableGenerators defined without specifying a segment value explicitly ended up using the same row.
> Where this cam up was in the case of annotations where the generator is attached to a base entity class.

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