Having an entity containing a map:
MyEntity is mapped as a map in hibernate:Code:class MyEntity { .... public Map<Locale, T> getTranslations() { return translations; } ...
When we persist and then load such an entity hibernate of course sets its own implementation of a map. Our views (jsp) use form tags:Code:... <map name="translations" cascade="merge,delete-orphan" inverse="true"> <key column="ID"/> <map-key type="LocaleUserType"> <column name="LNGCDE"/> <column name="CTYCDE"/> </map-key> <one-to-many class="MyEntityTranslation"/> </map> ...
On binding of an entity loaded by hibernate the map is no longer recognized as a ParameterizedType and therefore no converter (locale converter) could be found because the key type is supposed to be of type string.Code:<form:hidden path="translations[de_AT]"/>
How can we configure binding so that the locale converter can be found?
thomas


Reply With Quote