Java Hibernate Mapping Exception! (Could not determine type for: java.util.Map) -
i have made class name of movie folowing fields:
@id @generatedvalue private long id; private string name; @elementcollection(targetclass = string.class) private map<string, string> properties; private double rate; private integer voterscount; private date releasedate; private integer runtime; @manytomany @jointable(name = "movie_director") @indexcolumn(name = "directorindex") private list<person> directors; @manytomany @jointable(name = "movie_writer") @indexcolumn(name = "writerindex") private list<person> writers; @onetomany @indexcolumn(name = "roleindex") private list<movierole> movieroles; @manytomany @jointable(name = "movie_genre") @indexcolumn(name = "genreindex") private list<genre> genres;
as can see, have used hibernate annotation , object bean. when try open hibernate session following code...
session = hibernatesessionfactory.getsessionfactory().opensession();
i encounter problem regarding not map java.util.map class. here exception stack trace:
org.hibernate.mappingexception: not determine type for: java.util.map, columns: [org.hibernate.mapping.column(properties)] @ org.hibernate.mapping.simplevalue.gettype(simplevalue.java:266) @ org.hibernate.mapping.simplevalue.isvalid(simplevalue.java:253) @ org.hibernate.mapping.property.isvalid(property.java:185) @ org.hibernate.mapping.persistentclass.validate(persistentclass.java:410) @ org.hibernate.mapping.rootclass.validate(rootclass.java:192) @ org.hibernate.cfg.configuration.validate(configuration.java:1099) @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1284) @ main.hibernatesessionfactory.getsessionfactory(hibernatesessionfactory.java:29) @ main.mainclass.main(mainclass.java:26)
i'm new hibernate , don't know what's happening... please me!
that's because have use jpa2 implementation! guy had same problem
Comments
Post a Comment