[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] one nested embeddable embedded in single entity multiple times with attribute override and having different columns , Select and update statements are prepared for one set of embedded columns
|
Hi Ramu,
I have reproduced your issue. It looks like a bug. Please file a bug.
-Tom
On 11/02/2013 9:10 AM, Ramu wrote:
Hi Tom,
Below is the mapping file
<?xml version="1.0" encoding="windows-1252" ?>
<entity-mappings version="2.4"
xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/orm
http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_2_4.xsd">
<entity class="com.test.embeddable.nesting.MySimpleEntity">
<attributes>
<id name="id">
<column name="ENTITY_ID" />
<generated-value />
</id>
<basic name="name">
<column name="ENTITY_NAME" />
</basic>
<embedded attribute-type="com.test.embeddable.nesting.SimpleEmbLevel2"
name="simpleEmbLevel2">
<attribute-override
name="simpleEmbLevel3.currencyCode">
<column name="MONEY_CCY" />
</attribute-override>
<attribute-override
name="pllSimpleEmbLevel3.currencyCode">
<column name="PLL_MONEY_CCY" />
</attribute-override>
</embedded>
</attributes>
</entity>
<embeddable class="com.test.embeddable.nesting.SimpleEmbLevel2">
<attributes>
<embedded attribute-type="com.test.embeddable.nesting.SimpleEmbLevel3"
name="simpleEmbLevel3" />
<embedded attribute-type="com.test.embeddable.nesting.SimpleEmbLevel3"
name="pllSimpleEmbLevel3" />
</attributes>
</embeddable>
<embeddable class="com.test.embeddable.nesting.SimpleEmbLevel3">
<attributes>
<basic attribute-type="java.lang.String" name="currencyCode" />
</attributes>
</embeddable>
</entity-mappings>
And SQL are
For Insert
[EL Fine]: sql: 2013-02-11
19:38:40.721--Connection(50600054)--Thread(Thread[main,5,main])--INSERT INTO
JPA_NSTD_EMDBL_SMP_MYENTITY (ENTITY_ID, ENTITY_NAME, PLL_MONEY_CCY,
MONEY_CCY) VALUES (?, ?, ?, ?)
bind => [16401, ABCMon Feb 11 19:38:40 IST 2013, INR, AUD]
For select
[EL Fine]: sql: 2013-02-11
19:38:41.362--Connection(50600054)--Thread(Thread[main,5,main])--SELECT
ENTITY_ID, ENTITY_NAME, PLL_MONEY_CCY FROM JPA_NSTD_EMDBL_SMP_MYENTITY WHERE
(ENTITY_ID = ?)
bind => [16401]
for update im getting null pointer exception as the second component is not
prepared
--
View this message in context: http://eclipse.1072660.n5.nabble.com/one-nested-embeddable-embedded-in-single-entity-multiple-times-with-attribute-override-and-having-dis-tp157723p157731.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users