[Hibernate-JIRA] Created: (HHH-2295) entity-name attribute's syntax not clearly documented
by Jeremy Michael Crosbie (JIRA)
entity-name attribute's syntax not clearly documented
-----------------------------------------------------
Key: HHH-2295
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2295
Project: Hibernate3
Type: Bug
Components: documentation
Versions: 3.2.1
Environment: Windows XP/JDK 1.5/HypersonicSQL
Reporter: Jeremy Michael Crosbie
Priority: Minor
Attachments: Group.hbm.xml
Setting entity-name to a value containing a hyphen, in my case 'lender-group' causes odd behaviors seemingly only when calling get() or load(). Also in my case I am mapping a class to two different tables (attached). The first mapping has an entity name with a hyphen, the other does not. When I call load *after committing a transaction where a new entity is persisted* I get an exception (see below). The exception complains of a column called "LENDER" not existing. But once I change the entity-name to something like 'lendergroup' the problem goes away. Interestingly, the missing column complained about is the text before the hyphen, so if I name the entity 'lndr-group' it complains of a column name 'LNDR' not existing.
It almost appears if this format is assuming some sort of discriminator, but the online docs are terse when it comes to describing the entity-name field.
Exception:
org.hibernate.exception.SQLGrammarException: could not load an entity: [lender-group#G9]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1799)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:47)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:41)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:799)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
at $Proxy0.get(Unknown Source)
at com.fares.mtrac.group.GroupDaoImpl.findById(GroupDaoImpl.java:148)
at com.fares.mtrac.group.GroupDaoImplTest.testFindByIdStringCompanyType(GroupDaoImplTest.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.sql.SQLException: Column not found: LENDER in statement [select lender-gro0_.group_cd as group1_48_0_, lender-gro0_.group_nm as group2_48_0_, lender-gro0_.user_nm as user3_48_0_ from lender_group_name lender-gro0_ where lender-gro0_.group_cd=?]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
... 36 more
--
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
14 years, 8 months
[Hibernate-JIRA] Created: (HHH-2679) One to Many Unidirectional Association using Join Tables and <list> causes duplicate key constraint violation when an entry is deleted from the list.
by Priyajeet Hora (JIRA)
One to Many Unidirectional Association using Join Tables and <list> causes duplicate key constraint violation when an entry is deleted from the list.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2679
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2679
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.2
Environment: Java 1.5, Hibernate 3.2, MySQL 5. Might also effect NHibernate similarly.
Reporter: Priyajeet Hora
Priority: Critical
Consider this unidirectional one-to-many relation done using join tables.
Person --> Address (*).
The hibernate mapping is pretty much the same as
http://www.hibernate.org/hib_docs/v3/reference/en/html/associations.html#...
Though I am using <list> rather than a <set>
Following is the DDL (presented roughly) created by the hbm2ddl tool.
Table PersonAddress
Person_id varcahr not null
Address_id varchar not null unique
Person_list_index integer not null
primary key (Person_id, Person_list_index)
I create a person1 - person_id=1.
I create add1, add2, add3 - address_id=2,3,4 respectively.
then I add all 3 addresses to the list in person1.
persist it to database.
all good.
At this point in the database --
person_id---person_list_index---address_id
1--0--2
1--1--3
1--2--4
I get person1 back.
I remove add1.
save person1 back.
CONSTRIANT VIOLATION HERE DUE TO DUPLICATE KEY.
looking at what hibernate does ...
So after 1st save and before remove this is whats in the database -
person_id---person_list_index---address_id
1--0--2
1--1--3
1--2--4
basically shows the one to many there.
I want to remove the record no. 1--0--2. That is the 1st one.
So with the 1st row gone, hibernate needs to shift other records up so that the new list index is assingned.
expected output----
1--0--3
1--1--4
This is how hibernate proceeds
Step1: save info and delete on 1--2--4, to get rid of that last record.
Step2: update 1--0--2 to 1--0--3
BANG...CONSTRAINT VIOLATION DUE TO DUPLICATE KEY.
Why? because "3" in that address_id column is already there and that column is "unique" according to DDL.
Step3: update 1--0--3 to info saved from step1, that is to 1--1--4.
But cant persist this since step 2 fails.
Basically the algorithm of copy the value up when a delete is performed is not doing the copy correctly.
Way to get around this is to remove the "unique" constrint, but then that makes the relation a many to many.
-----------------------------------------------------------------------------
CREATE TABLE `PERSON`
(
`PRESON_ID` varchar(255) NOT NULL, PRIMARY KEY (PRESON_ID)
)
CREATE TABLE `ADDRESS`
(
`ADDRESS_ID` varchar(255) NOT NULL, PRIMARY KEY (ADDRESS_ID)
)
CREATE TABLE `PERSONADDRESS`
(
`PERSON_ID` varchar(255) NOT NULL
, `PERSON_IDX` integer NOT NULL
, `ADDRESS_ID` varchar(255) NOT NULL UNIQUE, PRIMARY KEY (PERSON_ID, PERSON_IDX)
)
ALTER TABLE `PERSONADDRESS`
ADD INDEX `PERSONADDRESS_FK_PERSON` (`PERSON_ID`),
ADD CONSTRAINT `PERSONADDRESS_FK_PERSON`
FOREIGN KEY (`PERSON_ID`)
REFERENCES PERSON(`PERSON_ID`)
ALTER TABLE `PERSONADDRESS`
ADD INDEX `PERSONADDRESS_FK_ADDRESS` (`ADDRESS_ID`),
ADD CONSTRAINT `PERSONADDRESS_FK_ADDRESS`
FOREIGN KEY (`ADDRESS_ID`)
REFERENCES ADDRESS(`ADDRESS_ID`)
Person.hbm.xml
-------------------------
<list name="AddressList" lazy="false" table="PersonAddress">
<key column="PERSON_ID" />
<index column="PERSON_IDX" />
<many-to-many column="ADDRESS_ID" unique="true" class="Address" />
</list>
Address.hbm.xml
--------------------------
No information about Person, since this is a unidirectional association.
Target doesnt know about the source.
Test psuedocode
-------------------------
//start transaction
Person person = new Person();
Address add1 = new Address();
Address add2 = new Address();
Address add3 = new Address();
person.add(add1);
person.add(add2);
person.add(add3);
// persist to database
person.save
// end transaction
// start transaction
// get back that person from database
person.remove(add1);
// persist to database
person.save <<<<<<<<<<<<<<< FAILS, duplicate key constraint violation
// end transaction
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-2341) ObjectNotFoundException on session.get() on non-existent object
by Timo Thomas (JIRA)
ObjectNotFoundException on session.get() on non-existent object
---------------------------------------------------------------
Key: HHH-2341
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2341
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.1
Environment: HSQLDB 1.8.0
Reporter: Timo Thomas
Hibernate version:
3.2.1 GA (same for hibernate-annotations)
Mapping documents:
Parent.java (omitting package and some import declarations)
import javax.persistence.*;
@Entity
public class Parent {
public Integer id;
public Set<Child> children = new HashSet<Child>();
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
public Set<Child> getChildren() {
return children;
}
public void setChildren(Set<Child> children) {
this.children = children;
}
}
Child.java (omitting package and some import declarations)
import javax.persistence.*;
@Entity
public class Child {
public Integer id;
public Parent parent;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@ManyToOne(optional = false)
@JoinColumn(name = "parent_fk")
public Parent getParent() {
return parent;
}
public void setParent(Parent parent) {
this.parent = parent;
}
}
Code between sessionFactory.openSession() and session.close():
Transaction transaction = session.beginTransaction();
Parent parent = new Parent();
parent.setName("p1");
session.persist(parent);
assertNotNull(parent.getId());
Integer parentId = parent.getId();
Child child = new Child();
child.setName("c1");
child.setParent(parent);
parent.getChildren().add(child);
session.persist(parent);
assertNotNull(child.getId());
Integer childId = child.getId();
transaction.commit();
session.close();
///////////////////////////////////////////
session = sessionFactory.openSession();
transaction = session.beginTransaction();
parent = (Parent) session.load(Parent.class, parentId);
child = (Child) session.load(Child.class, childId);
// child = (Child) session.get(Child.class, childId);
session.delete(parent);
// session.flush(); // !! required if session&transaction is re-opened and child is obtained with load(), otherwise exception on next line - BUG ?
child = (Child) session.get(Child.class, childId);
Full stack trace of any exception that occurs:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [model.Child#1]
at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:375)
at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:223)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:187)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
at test.CascadeAnnotationTest.testBug(CascadeAnnotationTest.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:228)
at junit.framework.TestSuite.run(TestSuite.java:223)
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
The generated SQL (show_sql=true):
Hibernate: insert into Parent (id, name) values (null, ?)
Hibernate: call identity()
Hibernate: insert into Child (id, name, parent_fk) values (null, ?, ?)
Hibernate: call identity()
Hibernate: select parent0_.id as id0_0_, parent0_.name as name0_0_ from Parent parent0_ where parent0_.id=?
Hibernate: select children0_.parent_fk as parent3_1_, children0_.id as id1_, children0_.id as id1_0_, children0_.name as name1_0_, children0_.parent_fk as parent3_1_0_ from Child children0_ where children0_.parent_fk=?
Why is this exception thrown under these circumstances? Am I using the API in an undocumented/disallowed way? If yes, where exactly?
The Hibernate API doc says, that Session.get() returns null if an object can't be found. No exception should be thrown.
However, Session.get() at the end of sample code does return null as expected, if either
a) Session.get() is used instead of load() some lines above (see commented line)
b) the transaction and the session is isn't closed or reopened, respectively
c) Session.flush() is called before the final call to Session.get()
I'd like to understand why Hibernate behaves like this, which I presume is erroneous. I'm a beginner in Hibernate, but I couldn't get any help in the forum.
Timo
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-2575) Query results are mapped to object array incorrectly when there is column ambiguity and aliases are not used
by Mike Hoeffner (JIRA)
Query results are mapped to object array incorrectly when there is column ambiguity and aliases are not used
------------------------------------------------------------------------------------------------------------
Key: HHH-2575
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2575
Project: Hibernate3
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.2
Environment: Hibernate 3.2.2 + MySQL 5.0.22 + MySQL Connector/J 5.0.5. Reproduced with HSQLDB 1.8.0.7.
Reporter: Mike Hoeffner
Priority: Minor
Attachments: ResultsNotEffectedByAliasesTest.java
I had a SQL (not HQL) query that basically looked like this:
select a.name, a.seq, b.name, b.seq from foo a, foo b;
and I noticed that the results obtained through list() -> (Object[]) get(i) -> row[0], row[1], row[2], row[3]
did not correspond to what I saw when manually running the query without Hibernate involved. row[2] always had the same values as row[0] and row[3] always had the same values as row[1].
When I tried adding aliases so that it became:
select a.name as a_name, a.seq as a_seq, b.name as b_name, b.seq as b_seq from foo a, foo b;
then the results matched what I expected. So having aliases in the SQL modified the results that were returned even though I was looking up the value from each column by its index / position instead of by its name / alias.
Attached is a test case that will reproduce this.
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-2661) Second-level cache is used after Session.setCacheMode(CacheMode.IGNORE)
by Anders Wallgren (JIRA)
Second-level cache is used after Session.setCacheMode(CacheMode.IGNORE)
-----------------------------------------------------------------------
Key: HHH-2661
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2661
Project: Hibernate3
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.2.4.sp1
Environment: Windows Vista
MySQL 5.0
Reporter: Anders Wallgren
I'm doing some bulk importing and want to disable the L2 cache, so I call Session.setCacheMode(CacheMode.IGNORE) before doing any work.
However, the entities I'm creating still end up in the cache. It seems that org.hibernate.action.CollectionAction isn't doing the correct check to determine when to cache -- it only check for the existence of a configured cache, but doesn't check whether caching is enabled in the session.
For example, from CollectionAction.beforeExecutions:
public final void beforeExecutions() throws CacheException {
// we need to obtain the lock before any actions are
// executed, since this may be an inverse="true"
// bidirectional association and it is one of the
// earlier entity actions which actually updates
// the database (this action is resposible for
// second-level cache invalidation only)
if ( persister.hasCache() ) {
final CacheKey ck = new CacheKey(
key,
persister.getKeyType(),
persister.getRole(),
session.getEntityMode(),
session.getFactory()
);
lock = persister.getCache().lock(ck, null);
}
}
Shouldn't "if ( persister.hasCache() )" be persistence.hasCache && getSession.getCacheMode.isPutEnabled(), or something along those lines?
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HHH-2668) Caching Fails with Composite-Ids Containing Nested, Complex Entities
by Juan Osuna (JIRA)
Caching Fails with Composite-Ids Containing Nested, Complex Entities
--------------------------------------------------------------------
Key: HHH-2668
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2668
Project: Hibernate3
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.2.4.sp1
Environment: Problem is independent of environment or platform and most likely exists in prior versions.
Reporter: Juan Osuna
Attachments: hibernate-caching-fix.zip
Description of Failing Test Case Scenario
Preconditions: An entity class is mapped that uses a composite-id that contains a nested entity class. Only the composite-id class implements equals/hashcode, not the nested entity class.
Steps to Reproduce:
1. open session and fetch object using composite-id
2. open new session and fetch same object again using different instance of composite-id but with same identity
Invalid Postconditions: On second retrieve, Hibernate fails to get the object from the cache and unnecessarily reloads the object. CachKeys containing different instances of the composite-id always fail to be equal even though they have the same persistent identity.
Attachment Contents
Code fix is attached as well as a Junit test case that reproduces the problem and validates the fix. The full Hibernate suite was also executed with no impact.
Attachment contains:
New Test Method:
org.hibernate.test.cache.BaseCacheProviderTestCase.testQueryCacheComplexItem
New Test Entity Items:
org\hibernate\test\cache\ComplexItem.hbm.xml
org.hibernate.test.cache.ComplexItem
org.hibernate.test.cache.ComplexItemPK
Code Fix:
org.hibernate.cache.CacheKey (see FIX comments)
Problem and Fix Details
Hibernate generally strives to use persistent identifiers for managing object identity rather than the equals/hashcode methods implemented by entity classes. While it is good practice to implement equals/hashcode, Hibernate does not generally force users to do this.
When wrapping a composite-id object, the current implementation of CacheKey fails to recurse through nested complex entities to query for equality based on persistent identity. Instead, when the recursion algorithm hits a complex entity, it invokes equals directly on that entity rather than further recursing through the identifier object.
Notably, the recursion logic for equals is not symmetrical with the recursion logic for hashcode, which does recurse through identifier objects. So, while CacheKey never invokes hashcode on nested complex entities, it does invoke equals on these entities.
A simple fix to this inconsistency is to store the factory parameter passed to CacheKey and later pass that parameter to the overloaded method:
Type.isEqual(Object x, Object y, EntityMode entityMode, SessionFactoryImplementor factory).
This fix restores symmetry to equals and hashcode behavior. By calling this overloaded method, the thread of execution will enter EntityType. isEqual(Object x, Object y, EntityMode entityMode, SessionFactoryImplementor factory), which correctly recurses through complex identifiers.
Design Principles
Hibernate should strive to behave predictably even in scenarios where users do not follow best practices.
Hibernate should strive to be as forgiving as possible as long there is no negative consequence caused by such forgiveness.
Hibernate should behave as consistently as possible. If Hibernate does not generally rely user-implemented equals/hashcode, it is best to avoid exceptions to this rule wherever possible.
Possible Future Enhancement
Mapping composite-ids that contain complex entities can cause deep object graphs to be cached as part of CacheKey. This is unsettling because of it's potential to consume memory unnecessarily and unpredictably.
Currently, CacheKey caches the hashcode by recursing through a complex graph of identifier objects. Perhaps, it would also be possible for CacheKey to cache an object graph of identifier objects whose leaves hold primitive values. This would further add symmetry between hashcode and equals and lighten the load for caching composite-ids that hold entity classes.
Robustly supporting composite-ids that hold complex identifiers seems like a worthwhile design goal.
--
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
14 years, 10 months