We are in the process of upgrading from OJB 0.8.375 to
1.0.RC4. Firstly let me congratulate the development team
on a very impressive product. I really owe a huge debt to
OJB for teaching me a lot about O-R mapping and good OO
design techniques.
I am trying to transform our 0.8.375 repository mappings
using the supplied 0.8to0.9.xsl file. I have a problem with
extents where the extents are not in a ExtentDescriptor
element.
Here is a sample 0.8.375 mapping.
<ClassDescriptor id="AVK_INDIVIDUAL">
<class.name>model.persistence.test.businessobject.Individual</class.name>
<class.extent>model.persistence.test.businessobject.Customer</class.extent>
<class.extent>model.persistence.test.businessobject.Traveller</class.extent>
<class.extent>model.persistence.test.businessobject.Vendor</class.extent>
<table.name>AVK_JUNIT_PERSIST_INDIVIDUAL</table.name>
<FieldDescriptor id="1">
<field.name>_id</field.name>
<column.name>ID</column.name>
<jdbc_type>BINARY</jdbc_type>
<PrimaryKey>true</PrimaryKey>
<autoincrement>true</autoincrement>
</FieldDescriptor>
</ClassDescriptor>
This is transformed to
<class-descriptor
class="model.persistence.test.businessobject.Individual"
table="AVK_JUNIT_PERSIST_INDIVIDUAL">
<field-descriptor autoincrement="true" column="ID" id="1"
jdbc-type="BINARY" name="_id" primarykey="true"/>
</class-descriptor>
The extents are being dropped.
I added the following template to the xsl file.
<!-- begin ClassDescriptor/class.extent -->
<xsl:template match="ClassDescriptor[class.extent]"
mode="element">
<xsl:apply-templates select = "class.extent"
mode="elements"/>
</xsl:template>
<!-- end ClassDescriptor/class.extent -->
Also added to
<xsl:template match="ClassDescriptor"
mode="elements">
<class-descriptor>
<xsl:apply-templates select="@*|*" mode="attribute"/>
<!-- new for class.extent -->
<xsl:apply-templates select="class.extent"
mode="elements"/>
.....
This seems to solve the problem. Since I basically know
nothing about xsl, perhaps someone can verify what I have
done and if correct, modify the xsl file.
Avril
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]