Results 1 to 1 of 1

Thread: ParametrizedType gets lost for conversion service on Maps if proxied

Threaded View

  1. #1
    Join Date
    Aug 2004
    Location
    Wels, Austria
    Posts
    4

    Default 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 at 02:36 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •