I know I can access the field directly, but I don't want to. There is other parts of my code that rely on me using this method, so I have to use a PropertyAccesor.
I know that the name I want to use is invalid in Java, but then I shoudn't be allowed to set the name to an invalid name on a property. I is the inconsistancy between properties and lists, that bothers me.
Please have a look at my code below:
Code:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="biz.c24.io.xmltest.schema.example.v0.v0.v0" auto-import="false">
<class lazy="false" name="biz.c24.io.xmltest.schema.example.v0.v0.v0.PurchaseorderLocalImpl">
<id unsaved-value="null" name="idKey">
<generator class="native"/>
</id>
<list access="biz.c24.io.api.presentation.CollectionAccessor" node="lineitem" lazy="false" name="line-item">
<key>
<column name="purchaseorder_lineitem_id"/>
</key>
<list-index column="_index"/>
<one-to-many class="biz.c24.io.xmltest.schema.example.v0.v0.v0.LineitemImpl"/>
</list>
<property column="okok" type="java.lang.Boolean" access="biz.c24.io.api.presentation.PropertyAccessor" not-null="false" name="ok-ok"/>
</class>
</hibernate-mapping>
Property okok works fine, but the list gives problems.
I have to use this "Invalid" alias, is there another way?
Thanks again