title: "Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements" in hibernate when annotating a ConcurrentHashMap
body: <p>I've tried annotating a property accessor whose return value is a map as follows:</p>
  
  <pre><code>@MapKeyColumn(name="parameter_name")
  @ElementCollection
  public ConcurrentHashMap&lt;String, Serializable&gt; getParameterValues()
  </code></pre>
  
  <p>This is in accordance with the hibernate user guide (section 2.2.5.3.4.). However, I get:</p>
  
  <pre><code>org.hibernate.AnnotationException: Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: ConfigurationParameterBag.parameterValues
  at org.hibernate.cfg.annotations.CollectionBinder.getCollectionBinder(CollectionBinder.java:324)
  at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1723)
  at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:796)
  at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:707)
  at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:4035)
  at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3989)
  at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1398)
  at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:1002)
  at org.hibernate.tool.hbm2ddl.SchemaExport.&lt;init&gt;(SchemaExport.java:130)
  at org.hibernate.tool.hbm2ddl.SchemaExport.&lt;init&gt;(SchemaExport.java:92)
  </code></pre>