[Hibernate-JIRA] Updated: (HHH-1365) NPE AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372) when trying to load a class defined in a signed/sealed JAR
by David Cox (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1365?page=c... ]
David Cox updated HHH-1365:
---------------------------
Attachment: hibernate-hack.jar
I've had this problem several times over the years. The problem was the that the generated proxy classes ended up in the same package as signed classes which they are proxying. You can change this in CGLIB using a custom naming policy to make the proxy classes in a different package. The problem is that setting that is not very easy. My first hack was to actually tweak the CGLIBLazyInitializer hibernate class. That was distasteful in that I had to replace the class file in the jar. This second solution seems to be better. I made copies of the CBLIBLazyInitializer and CGLIBProxyFactory, calling them SignSafe***. I then subclassed PojoTuplizer which uses the CGLIB-hibernate classes. Instead my SignSafeTuplizer uses the SignSafe proxy classes. You just package these with your app and configure your class to use the custom tuplizer (see attached Customer.java).
I hope this prevents anybody else from going through this again. The only potential downside of this solution is if there is a java package access restriction in the original class because the proxy will be in a different package.
> NPE AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372) when trying to load a class defined in a signed/sealed JAR
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HHH-1365
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1365
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.1
> Environment: Java1.5.06 Ant1.7alpha, hibernate 3.1
> Reporter: Steve Loughran
> Priority: Minor
> Attachments: cglib-src-2.1_3.patch, hibernate-hack.jar
>
>
> I'm testing what happens to hibernate when running against a signed JAR. The answer is: most tests pass. What fails is this test (Apache 2.0 license, BTW)
> public void testDetachedObject() throws Exception {
> Event event = createTestEvent();
> session.save(event);
> session.flush();
> closeSession();
> //here the event is detached.
> //we change it outside an operation.
> String text = "modified";
> event.setText(text);
> session = getSessionFactory().openSession();
> Event merged=(Event) session.merge(event);
> assertEquals(event, merged);
> session.flush();
> closeSession();
> session = getSessionFactory().openSession();
> Event loaded = (Event) session.load(Event.class, event.getKey());
> assertEquals(text, loaded.getText());
> assertEquals(event, loaded);
> }
> the session.load operation is failing, with the short stack trace of:
> java.lang.NullPointerException
> at org.hibernate.tuple.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372)
> at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3121)
> at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:232)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:173)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
> at org.hibernate.impl.SessionImpl.load(SessionImpl.java:788)
> at org.hibernate.impl.SessionImpl.load(SessionImpl.java:781)
> at d1.persist.test.SessionTest.testDetachedObject(SessionTest.java:155)
> The root cause is probably contained in the info that gets printed when the session starts up, complaining that things cant be added to sealed classes
> [junit] 2261 ERROR org.hibernate.proxy.BasicLazyInitializer - CGLIB Enhancement failed: d1.persist.Event
> [junit] net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
> [junit] at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
> [junit] at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
> [junit] at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
> [junit] at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
> [junit] at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
> [junit] at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
> [junit] at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
> [junit] at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
> [junit] at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
> [junit] at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:257)
> [junit] at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
> [junit] at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
> [junit] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
> [junit] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
> [junit] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)
> [junit] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:375)
> [junit] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:533)
> [junit] at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:109)
> [junit] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:155)
> [junit] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:82)
> [junit] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
> [junit] at d1.persist.PersistTools.createManagerFactory(PersistTools.java:82)
> [junit] at d1.persist.PersistTools.createDefaultManagerFactory(PersistTools.java:76)
> [junit] at d1.persist.test.Ejb3TestBase.setUp(Ejb3TestBase.java:27)
> [junit] at junit.framework.TestCase.runBare(TestCase.java:125)
> [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
> [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
> [junit] at junit.framework.TestResult.run(TestResult.java:109)
> [junit] at junit.framework.TestCase.run(TestCase.java:118)
> [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
> [junit] at junit.framework.TestSuite.run(TestSuite.java:203)
> [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:328)
> [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:736)
> [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:605)
> [junit] Caused by: java.lang.reflect.InvocationTargetException
> [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [junit] at java.lang.reflect.Method.invoke(Method.java:585)
> [junit] at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
> [junit] at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
> [junit] ... 33 more
> [junit] Caused by: java.lang.SecurityException: class "d1.persist.Event$$EnhancerByCGLIB$$55c8eae8_2"'s signer information does not match signer information of other classes in the same package
> [junit] at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
> [junit] at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
> [junit] at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
> [junit] ... 39 more
> [junit] 2262 WARN org.hibernate.tuple.PojoEntityTuplizer - could not create proxy factory for:d1.persist.Event
> [junit] org.hibernate.HibernateException: CGLIB Enhancement failed: d1.persist.Event
> [junit] at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:132)
> [junit] at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
> [junit] at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
> [junit] at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
> [junit] at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
> [junit] at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
> [junit] at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:257)
> [junit] at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
> [junit] at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
> [junit] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
> [junit] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
> [junit] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)
> [junit] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:375)
> [junit] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:533)
> [junit] at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:109)
> [junit] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:155)
> [junit] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:82)
> [junit] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
> [junit] at d1.persist.PersistTools.createManagerFactory(PersistTools.java:82)
> [junit] at d1.persist.PersistTools.createDefaultManagerFactory(PersistTools.java:76)
> [junit] at d1.persist.test.Ejb3TestBase.setUp(Ejb3TestBase.java:27)
> [junit] at junit.framework.TestCase.runBare(TestCase.java:125)
> [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
> [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
> [junit] at junit.framework.TestResult.run(TestResult.java:109)
> [junit] at junit.framework.TestCase.run(TestCase.java:118)
> [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
> [junit] at junit.framework.TestSuite.run(TestSuite.java:203)
> [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:328)
> [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:736)
> [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:605)
> [junit] Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
> [junit] at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
> [junit] at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
> [junit] at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
> [junit] at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
> [junit] ... 30 more
> [junit] Caused by: java.lang.reflect.InvocationTargetException
> [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [junit] at java.lang.reflect.Method.invoke(Method.java:585)
> [junit] at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
> [junit] at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
> [junit] ... 33 more
> [junit] Caused by: java.lang.SecurityException: class "d1.persist.Event$$EnhancerByCGLIB$$55c8eae8_2"'s signer information does not match signer information of other classes in the same package
> [junit] at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
> [junit] at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
> [junit] at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
> [junit] ... 39 more
> No doubt there is some way to configure hibernate to create proxies in a different package, and I shall seek that option out. All I want to note here is that NPEs are not the best way to report failure.
--
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
17 years, 6 months
[Hibernate-JIRA] Created: (HBX-949) Column names in generated SQL should be surrounded by the backtick character
by William L Baker (JIRA)
Column names in generated SQL should be surrounded by the backtick character
----------------------------------------------------------------------------
Key: HBX-949
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-949
Project: Hibernate Tools
Issue Type: Bug
Components: reverse-engineer
Affects Versions: 3.2beta9
Environment: Any
Reporter: William L Baker
Orinally opened as HH-2660 for Hibernate Core, and rejected since it can be specified at the mapping (annotation) level. Revenge should thus put the backticks in the mapping file.
The original description follows:
Column names in generated SQL statements should be surrounded by the backtick character. This is necessary for column names that conflict with reserved words or functions. It is easily demonstrated by creating a table with a column name DIV and a column name GROUP. Hibernate currently generates invalid sql statements for accessing this table. "select DIV, GROUP from NEWTABLE" gives a syntax error. "select `DIV`, `GROUP` from NEWTABLE works as expected. It is only necessary to change two lines of code to fix this behavior.
Though this is supposed to work, it might causes some side effects. I tested a patch at the Core level, but have not tested revised annotations.
Don't know how other mapping tools behave such as tophat.
--
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
17 years, 6 months
[Hibernate-JIRA] Created: (HHH-2662) Workaround PostgreSQL issues in testsuite
by Steve Ebersole (JIRA)
Workaround PostgreSQL issues in testsuite
-----------------------------------------
Key: HHH-2662
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2662
Project: Hibernate3
Issue Type: Improvement
Components: testsuite
Environment: PostgreSQL
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.2.5, 3.3
Currently there are two specific issues with the Hibernate test suite running on PostgreSQL which requires specific work-arounds. Note that both of these really are bugs in the PostgreSQL driver/backend. But I'd like to not keep getting spammed from CC builds because of this ;)
1) unspecified primitive char values. java initializes these as '\0'. For char values mapped via CharacterType, we then take that and bind it to the PS as a string (setString). The problem is that the PostgreSQL backend is all C, where '\0' has special meaning (it used as the "string terminator" character). Anyway, the driver/backend do not handle this value even though it is in fact a valid java character. The workaround is to convert these to non-primitive java.lang.Character and set to null.
2) I dont even know how to categorize this one yet really. Its a strange issue in regards to transaction state maintained by the driver/connection in autocommit scenarios. This has an interesting manifestation in the Hibernate testsuite. Say I have two test methods, testA and testB. testA executes first, followed by testB. testA is explicitly checking some exception condition and is using auto-commit. So the test "passes" (by the exception occurring and being caught/handled). The connection is returned to the pool. Next testB starts, and it is using explicit transactions. It fails. The reason for the failure is a driver error: [ERROR: current transaction is aborted, commands ignored until end of transaction block]. The cause is because the connection did not "clean itself up" after the last test. The work around here is to use explicit transactions in testA...
--
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
17 years, 6 months
[Hibernate-JIRA] Created: (HHH-2660) Column names in generated SQL should be surrounded by the backtick character
by William L Baker (JIRA)
Column names in generated SQL should be surrounded by the backtick character
----------------------------------------------------------------------------
Key: HHH-2660
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2660
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1
Environment: All 3.2 versions. All databases. I use MySQL.
Reporter: William L Baker
Column names in generated SQL statements should be surrounded by backtick character. This is necessary for column names that conflict with reserved words or functions. It is easily demonstrated by creating a table with a column name DIV and a column name GROUP. Hibernate currently generates invalid sql statements for accessing this table. "select DIV, GROUP from NEWTABLE" gives a syntax error. "select `DIV`, `GROUP` from NEWTABLE works as expected. It is only necessary to change two lines of code to fix this behavior.
diff good\src\org\hibernate\sql\Insert.java bad\src\org\hibernate\sql\Insert.java
91c91
< buf.append( "`" + iter.next() + "`" );
---
> buf.append( iter.next() );
diff good\src\org\hibernate\sql\Update.java bad\src\org\hibernate\sql\Update.java
143c143
< buf.append( "`" + e.getKey() + "`" ).append( '=' ).append( e.getValue() );
---
> buf.append( e.getKey() ).append( '=' ).append( e.getValue() );
--
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
17 years, 6 months
[Hibernate-JIRA] Created: (HHH-2659) Hibernate Not Generating XML Correctly for Joins
by Lincoln R. Carr (JIRA)
Hibernate Not Generating XML Correctly for Joins
------------------------------------------------
Key: HHH-2659
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2659
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1
Environment: Hibernate 3.2.4.sp1, Oracle 10g 10.2.0.3.0
Reporter: Lincoln R. Carr
Using entity mode, with no POJOs, and outer joins, Hibernate appears to generate XML incorrectly. That is, it seems not to map the query result from the outer join to the output XML correctly. A snippet from one of the hbm.xml files is as follows:
.
.
.
<hibernate-mapping>
<class
entity-name="com.ngsmedicare.ngd.il.data.hibernate.datamart.BeneMaster"
table="BENE_MASTER" schema="NDR">
<id name="Hicn" type="string">
<column name="HICN" length="12" />
<generator class="assigned" />
</id>
.
.
.
<set name="BeneHomeHealths" inverse="true" fetch="join">
<key>
<column name="HICN" length="12" not-null="true" />
</key>
<one-to-many
entity-name="com.ngsmedicare.ngd.il.data.hibernate.datamart.BeneHomeHealth" />
</set>
.
.
.
The generated SQL _is_ correct. A snippet corresponding to the snippet above is as follows:
select
.
.
.
from
NDR.HICN_XREF hicnxref0_
inner join
NDR.BENE_MASTER benemaster1_
on hicnxref0_.CURR_HICN=benemaster1_.HICN
.
.
.
left outer join
NDR.BENE_HOME_HEALTH benehomehe9_
on benemaster1_.HICN=benehomehe9_.HICN
where
hicnxref0_.SEARCH_HICN=?
However, the generated XML is _not_ correct. A section is as follows:
<HicnXref>
.
.
.
<beneMasterByCurrHicn>
.
.
.
<BeneHomeHealths>
<BeneHomeHealth>
<id>
<hicn>**********</hicn>
<occ>1</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>13 April 2006</startDt>
<endDt>11 June 2006</endDt>
<ebaDt>13 April 2006</ebaDt>
<lbaDt>11 May 2006</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>1</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>13 April 2006</startDt>
<endDt>11 June 2006</endDt>
<ebaDt>13 April 2006</ebaDt>
<lbaDt>11 May 2006</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>1</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>13 April 2006</startDt>
<endDt>11 June 2006</endDt>
<ebaDt>13 April 2006</ebaDt>
<lbaDt>11 May 2006</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>2</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>12 April 2005</startDt>
<endDt>10 June 2005</endDt>
<ebaDt>12 April 2005</ebaDt>
<lbaDt>20 May 2005</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>2</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>12 April 2005</startDt>
<endDt>10 June 2005</endDt>
<ebaDt>12 April 2005</ebaDt>
<lbaDt>20 May 2005</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>2</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>12 April 2005</startDt>
<endDt>10 June 2005</endDt>
<ebaDt>12 April 2005</ebaDt>
<lbaDt>20 May 2005</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>3</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>23 April 2004</startDt>
<endDt>21 June 2004</endDt>
<ebaDt>23 April 2004</ebaDt>
<lbaDt>10 May 2004</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>3</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>23 April 2004</startDt>
<endDt>21 June 2004</endDt>
<ebaDt>23 April 2004</ebaDt>
<lbaDt>10 May 2004</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
<BeneHomeHealth>
<id>
<hicn>*********</hicn>
<occ>3</occ>
</id>
<beneMaster>001105005A</beneMaster>
<recTs>26 April 2007</recTs>
<startDt>23 April 2004</startDt>
<endDt>21 June 2004</endDt>
<ebaDt>23 April 2004</ebaDt>
<lbaDt>10 May 2004</lbaDt>
<contractorId>11</contractorId>
<providerId>107338A</providerId>
<patientStatusCd>01</patientStatusCd>
</BeneHomeHealth>
</BeneHomeHealths>
</beneMasterByCurrHicn>
</HicnXref>
The <hicn> field values have been replaced with asterisks because of privacy concerns. If one executes the SQL above, the result has 9 rows total. However, the table correspondding to the <BeneHomeHealth> elements only has three pertinent entries, indicated by the <occ> element. Hibernate seems to be dealing with the Cartesian product incorrectly, generating "extra" entries in the XML. In the above XML, each <BeneHomeHealth> element is repeated 3 times when it should only be included once. One should note that the <BeneHomeHealth> elements with the same <occ> value are identical.
--
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
17 years, 6 months