Announcement Announcement Module
Collapse
No announcement yet.
ParametrizedType gets lost for conversion service on Maps if proxied Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ParametrizedType gets lost for conversion service on Maps if proxied

    Having an entity containing a map:
    Code:
    class MyEntity {
    ....
    	public Map<Locale, T> getTranslations() {
    		return translations;
    	}
    ...
    MyEntity is mapped as a map in hibernate:
    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>
    ...
    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:
    <form:hidden path="translations[de_AT]"/>
    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.

    How can we configure binding so that the locale converter can be found?

    thomas
    Last edited by tufelix; Apr 21st, 2011, 02:36 AM.
Working...
X