User Story #54 (closed)
Opened 18 years ago
Closed 9 years ago
UUID support needed in model instances.
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | minor | Milestone: | GatherReqs |
Component: | Model | Keywords: | n.a. |
Cc: | ajpatterson | Story Points: | n.a. |
Sprint: | n.a. | Importance: | n.a. |
Total Remaining Time: | n.a. | Estimated Remaining Time: | n.a. |
Description
Currently model instances are provided an id once they are persisted. (In Postgres this means a call to select nextval...). This has several implications.
- A new instance on the client cannot be correlated to a persisted instance.
- The equals() implementation in the model instances must be reference based only. (The setting of the primary key after creation would break the contract of equals()).
- There is no clear candidate for an LSID, barring the use of a db_instance value.
Therefore it would be beneficial (barring performance issues) to create a UUID for each instance which also gets stored in the DB.
Implementations
Change History (5)
comment:1 Changed 18 years ago by jmoore
comment:2 Changed 18 years ago by jmoore
- Milestone changed from Unscheduled to 3.0-M4
Moving this up to M4, since it may mean re-architecting a bit.
comment:3 Changed 17 years ago by jmoore
- Milestone changed from 3.0-Beta2 to GatherReqs
comment:4 Changed 13 years ago by ajpatterson
- Cc ajpatterson added
comment:5 Changed 9 years ago by jamoore
- Resolution set to wontfix
- Status changed from new to closed
This would require a massive rewrite. We'll scope that when/if needed.
A little support for this proposal which even takes it a bit farther
http://www.onjava.com/pub/a/onjava/2006/09/13/dont-let-hibernate-steal-your-identity.html
It also prevents the extra db call : select next_val... on postgres.