Eclipselink 1.1.3 choosing the wrong table id generator [message #534651] |
Wed, 19 May 2010 13:50  |
Eclipse User |
|
|
|
I am running eclipselink 1.1.3 and have custom table id generators. From my "orm.xml":
<entity class=" com.canoga.nms.pkg.pkg9145.v1.device.entity.DeviceSummary914 5 ">
<table-generator schema="PKG_9145_V1"
table="ID_GENERATOR"
pk-column-name="SEQ_NAME"
value-column-name="SEQ_COUNT"
name="DEVICESUMMARY_ID_GENERATOR_PKG_9145_V1"
pk-column-value="DEVICESUMMARY_ID"/>
<attributes>
<id name="id">
<generated-value strategy="TABLE" generator="DEVICESUMMARY_ID_GENERATOR_PKG_9145_V1"/>
</id>
</attributes>
</entity>
<entity class="com.canoga.nms.pkg.pkg9161.device.entity.DeviceSummary9161 ">
<table-generator schema="PKG_9161"
table="ID_GENERATOR"
pk-column-name="SEQ_NAME"
value-column-name="SEQ_COUNT"
name="DEVICESUMMARY_ID_GENERATOR_PKG_9161"
pk-column-value="DEVICESUMMARY_ID"/>
<attributes>
<id name="id">
<generated-value strategy="TABLE" generator="DEVICESUMMARY_ID_GENERATOR_PKG_9161"/>
</id>
</attributes>
</entity>
<entity class=" com.canoga.nms.pkg.pkg9145e10g.device.entity.DeviceSummary91 45E10G ">
<table-generator schema="PKG_9145E10G"
table="ID_GENERATOR"
pk-column-name="SEQ_NAME"
value-column-name="SEQ_COUNT"
name="DEVICESUMMARY_ID_GENERATOR_PKG_9145E10G"
pk-column-value="DEVICESUMMARY_ID"/>
<attributes>
<id name="id">
<generated-value strategy="TABLE" generator="DEVICESUMMARY_ID_GENERATOR_PKG_9145E10G"/>
</id>
</attributes>
</entity>
What I am seeing is that Eclipselink is choosing the wrong generator for the
" com.canoga.nms.pkg.pkg9145.v1.device.entity.DeviceSummary914 5 " entity. It is using the generator specified for the
" com.canoga.nms.pkg.pkg9145e10g.device.entity.DeviceSummary91 45E10G " entity. Note that all use the same "pk-column-value" with the
same constant "DEVICESUMMARY_ID". In the log I see displayed:
[#|2010-05-19T10:58:45.187-0400|FINEST|sun-appserver2.1|org. eclipse.persistence.session.file:/C:/package/glassfish/domai ns/domain1/applications/j2ee-apps/csem/csem-core-api.jar-cse m-PU.sequencing|_ThreadID=13;_ThreadName=pool-1-thread-3;Cla ssName=null;MethodName=null;_RequestID=bd27fedc-98e1-4bf4-a1 ad-bc7dc26a0136;|sequence
DEVICESUMMARY_ID: preallocation size 50|#]
Note that I only see this once, not for each entity. So on a whim, I decided to change the "pk-column-value" to be unique for each
entity. Now it chooses the correct one. But I would assume that the table identity information would be chosen based upport the
"generator" value assigned to each id attribute and then from the generator use the correct schema, table, and row. This is not
happening.
Does anyone know why?
Thanks
Brett
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03380 seconds