Hi,
I am using JDO access to the database with the persistence defined in package.jdo XML metadata files. In those metadata files I have few persistence-capable classes which had extents in ObjectDB 1 (with an OID for every instance) and all other classes were embedded (so without extent and own OID) in those few peristence-capable ones.
Example of JDO metadata:
<class name="ProjectPart"> <field name="rackGroupList" embedded="true"/> </class> <class name="RackGroupList"> <field name="list" embedded="true"> <collection embedded-element="true" /> </field> </class>
So as You see in the example I have the instances of RackGroupList embedded inside the instance of ProjectPart and the elements inside the RackGroupList are embedded too.
I did not change the metadata when I was moving from ObjectDB 1 to 2, I only adjusted the neccessary code to access the database (JDOConnection, etc.) and converted the DB files.
After conversion I got a slightly smaller file with same number of objects (e.g. 3,3GB old file -> 3GB new file).
However after using the v2 database in the same manner as before the embedding seems to be ignored. after 3 weeks of usage I have a db file of 12GB with 250 000 000 objects instead of the original 360 000 at the time of conversion.
Additionally I see in the DB Explorer every class as not embedded, with own extent and OID for every instance.
So my questions are:
1. Is the enormous increase of database file size caused by the number of not-embedded objects in ObjectDB 2 opposed to embedded ones in objectDB 1 ?
2. Could be that ObjectDB 2 is ignoring the "embedded=true" attribute in the package.jdo XML ? If yes, how to handle this ?
3. Should the @Embedded annotations work better ?
4. Is there some way to convert a database file with these not-embedded objects to an equivalent file with embedded objects ?
Thx,
JG