Hi! i have a TimePeriod class, wich contains begin TimePoint, and end TimePoint. TimePoint class represents a single Date value.
I think id doesn't make sense, to map these classes as entities. I prefer to map them as value objects.
Unfortunatly, i get the following exeption: org.hibernate.QueryException: could not resolve property: end of: com.itcodex.objectpuzzle.party.domain.Person
(Person is a class wich has a TimePeriod association called valid)
I map it like this in Person.hbm.xml:
Code:
<component name="valid" class="com.itcodex.objectpuzzle.framework.fundamental_types.domain.TimePeriod">
<component name="begin" class="com.itcodex.objectpuzzle.framework.fundamental_types.domain.TimePoint">
<property name="value" column="BEGIN_VALUE" type="java.util.Date"></property>
</component>
<component name="end" class="com.itcodex.objectpuzzle.framework.fundamental_types.domain.TimePoint">
<property name="value" column="END_VALUE" type="java.util.Date"></property>
</component>
</component>
Am i doing something wrong? thanks.