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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira