I'm having a rather strange problem with type="local".
I get ClassCastException because Hibernate ignores my directive and instead uses StringType instead of LocaleType, so the cast fails.
My workaround is to use type="string" but it seems a sub-optimal solution. Any ideas?
Thanks, Dimitri
Hibernate version: 3.2
Mapping documents & classes (excerpts):
Code:
public class User implements java.io.Serializable {
...
private Locale locale;
...
public Locale getLocale() { return locale; }
public void setLocale(Locale locale) { this.locale = locale; }
Code:
<hibernate-mapping>
<class name="it.imaginary.platform.model.User" table="`USERS`">
...
<property name="locale" type="locale" column="`LOCALE`" length="2" not-null="true" />
...
</class>
</hibernate-mapping>