[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3155) Getter method metadata to support load()/getReference() proxies on field based id
Bob Tiernay (JIRA)
noreply at atlassian.com
Tue Mar 4 08:16:33 EST 2008
Getter method metadata to support load()/getReference() proxies on field based id
---------------------------------------------------------------------------------
Key: HHH-3155
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3155
Project: Hibernate3
Issue Type: Improvement
Reporter: Bob Tiernay
Currently, the best reason to go with Property mapping in Hibernate performance: If you often loop through collections and only read the id of the entities Hibernate doesn't need to fetch the entities from the database if you use property access type. This is because Hibernate knows getId() only returns the id it already has, but Hibernate has no clue what your getId() method returns if you have marked @Id Long id;
Well, what I propose is giving Hibernate a clue, thus opening up the possibility that field based @Id can produce proxies. Perhaps all that is needed is something like this:
@Id
Long id;
@Immutable
Long getId(){return this.id};
This way we can convey to Hibernate that getId() has no side effects.
--
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