Issue Details (XML | Word | Printable)

Key: HHH-2686
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Steve Ebersole
Reporter: Matt Solnit
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hibernate Core

Include a primary key in the sequence table used by id.enhanced.TableGenerator

Created: 25/Jun/07 06:05 PM   Updated: 29/Aug/08 01:23 AM
Component/s: None
Affects Version/s: 3.2.3
Fix Version/s: 3.2.7, 3.3.1, 3.5

Time Tracking:
Not Specified

File Attachments: 1. File TableGenerator.java.diff (0.2 kB)

Environment: Mac OS X (Intel) 10.4.9, Java 1.5.0_07, Hibernate 3.2.3.ga, MySQL 5.0.24a


 Description  « Hide
It would be great if the new TableGenerator used a primary key on the "sequence_name" column. This would most likely improve performance when you have a large number of "sequences" in the table. I attempted to provide a patch :-).

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Steve Ebersole added a comment - 28/Aug/08 09:19 AM
Thanks for the patch Matt. Mostly likely that will not be the solution though since it makes assumptions wrt how one can create a table's primary key which is dialect specific. Probably I should have just "done this correctly' and used o.h.mapping.Table from the start. I'll make that change, and add the o.h.mapping.PrimaryKey reference at the same time.

Is it specifically the INDEX for which you are looking?

Matt Solnit added a comment - 28/Aug/08 10:53 AM
Hi Steve. It's been a while since I looked at this, but yes, I believe it was mainly the INDEX, for performance reasons. Thanks for taking the time to address it.