Yes, I understand that. Even when I try to change this into java.lang.String, I get this error. I'm showing you this document also, because this is what I get generated through the Hibernate Xdoclet task which is weird (perhaps this is something for that mailing list then).
Anyway, is the Mappingexception: String error only reported against hbm.xml files that have "String" in the property tag? If this is so, then I don't understand how it can be. Where else can I look?
Why do the method names for these faulty properties get generated by xdoclet as getMethodName in stead of methodName like in the all the other places?
I just ran it against the manually changed file with the same error:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping
>
<class
name="nl.msw.dates4free.business.entities.User"
table="Users"
discriminator-value="U"
>
<id
name="userID"
column="UserID"
type="long"
unsaved-value="0"
>
<generator class="native">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-User.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>
<discriminator
column="Subclass"
type="char"
/>
<property
name="email"
type="java.lang.String"
column="getEmail"
not-null="false"
unique="false"
/>
<property
name="firstName"
type="java.lang.String"
column="getFirstName"
not-null="false"
unique="false"
/>
<property
name="lastName"
type="java.lang.String"
column="getLastName"
not-null="false"
unique="false"
/>
<property
name="userName"
type="java.lang.String"
column="getUserName"
not-null="false"
unique="false"
/>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-User.xml
containing the additional properties and place it in your merge dir.
-->
<subclass
name="nl.msw.dates4free.business.entities.Subscriber"
discriminator-value="S"
>
<one-to-one
name="tokenAccount"
class="nl.msw.dates4free.business.entities.TokenAccount"
cascade="none"
outer-join="auto"
constrained="false"
/>
<property
name="dateAdded"
type="java.util.Date"
column="dateAdded"
/>
<property
name="mobile"
type="int"
column="mobile"
/>
<property
name="online"
type="boolean"
column="online"
/>
<property
name="hits"
type="long"
column="hits"
not-null="false"
unique="false"
/>
<property
name="popularity"
type="int"
column="popularity"
/>
<set
name="bookmarks"
table="Bookmarks"
lazy="true"
cascade="save-update"
sort="unsorted"
order-by="UserName asc"
>
<key
column="UserID"
>
</key>
<many-to-many
class="nl.msw.dates4free.business.entities.Subscriber"
column="BookmarkUserID"
outer-join="auto"
/>
</set>
<set
name="messages"
lazy="true"
cascade="save-update"
sort="unsorted"
order-by="DateSent desc"
>
<key
column="To"
>
</key>
<one-to-many
class="nl.msw.dates4free.business.entities.Message"
/>
</set>
<set
name="blockedUsers"
table="BlockedUsers"
lazy="true"
cascade="save-update"
sort="unsorted"
order-by="UserName asc"
>
<key
column="UserID"
>
</key>
<many-to-many
class="nl.msw.dates4free.business.entities.Subscriber"
column="BlockedSubscriberID"
outer-join="auto"
/>
</set>
<set
name="favouriteUsers"
table="FavouriteUsers"
lazy="true"
cascade="save-update"
sort="unsorted"
order-by="UserName asc"
>
<key
column="UserID"
>
</key>
<many-to-many
class="nl.msw.dates4free.business.entities.Subscriber"
column="FavouriteSubscriberID"
outer-join="auto"
/>
</set>
<one-to-one
name="settings"
class="nl.msw.dates4free.business.entities.Settings"
cascade="none"
outer-join="auto"
constrained="false"
/>
<one-to-one
name="photo"
class="nl.msw.dates4free.business.entities.Photo"
cascade="none"
outer-join="auto"
constrained="false"
/>
<set
name="photos"
lazy="false"
cascade="none"
sort="unsorted"
>
<key
column="UserID"
>
</key>
<one-to-many
class="nl.msw.dates4free.business.entities.Photo"
/>
</set>
<property
name="receiveSMS"
type="boolean"
column="receiveSMS"
/>
<property
name="votes"
type="long"
column="votes"
/>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Subscriber.xml
containing the additional properties and place it in your merge dir.
-->
</subclass>
</class>
</hibernate-mapping>