Hello again, ELUsers. Perhaps there really aren't any complete EclipseLink/MongoDB/XML tutorials out there and if not, perhaps one of you good folks could help me with something strange. I am successfully persisting an Entity which has an Embeddable field in it, but all of the values of fields (primitive fields) get set to '{"#text": null}'. Example:
> db.WACTION.findOne()
{
"_id" : ObjectId("51a573f73004703030fca204"),
"wactionid" : {
"#text" : null
},
"UUID" : {
"uuid_clockSeqAndNode" : {
"#text" : null
},
"uuid_time" : {
"#text" : null
}
},
"STATUS" : {
"#text" : null
},
"TS" : {
"#text" : null
}
}
When I searched the internet for clues all I could find were references to XML processing or XML-JSON translation:
I'm not trying to move data from or to XML format so I don't even know if that is related to my problem. I know that the default DataFormatType for non-relational databases in EclipseLink is XML, so I made sure to set the "dataFormat":
<entity name="Waction" class="com.x.waction.Waction">
<no-sql dataFormat="DataFormatType.MAPPED" />
<attributes>
<id name="id" />
<basic name="mapKey">
<column name="wactionid" nullable="false" />
<access-methods get-method="getMapKeyString" set-method="setMapKeyString" />
</basic>
<basic name="ts" />
<basic name="status" />
<embedded name="uuid" />
<embedded name="context" />
</attributes>
</entity>
I'm a novice with EclipseLink so I might be missing something basic, but I also wonder if the XML mapping for "no-sql" might not correctly implement the "dataFormat" parameter.
Has anyone seen anything like this?
Nicholas