java - Hibernate: how to map collection of Double? -


how can map list of double values

class person {      @id     private string key;     @onetomany    @column(name="values")    private list<double> values; 

i error

use of @onetomany or @manytomany targeting unmapped class: person.values[java.lang.double] 

try use annotation @collectionofelements like:

@collectionofelements    @column(name="values")    private list<double> values; 

this work if using 3.4.

and if you're using hibernate annotations 3.5+, prefer jpa 2.0 annotations use @elementcollection annotation :

@elementcollection @column(name="values")    private list<double> values; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -