Thursday, June 07, 2012

hibernate3:hbm2ddl - Could not determine type for: java.util.List

Trying to generate DB tables from Java classes, I got this error for this one-to-many mapping:

    @ElementCollection(targetClass = DocArea.class)
    @CollectionTable(name = "area_doc",
        joinColumns = @JoinColumn(name = "id_doc"))
    @Column(name = "id_area")
    public List getAreas() {
        return areas;
    }

where Area is an enumeration.
It was a version incompatibility between the hibernate3 plugin and Hibernate itself. I found out you can override a plugin's dependencies in the configuration of the plugin itself thanks to Ivar's post.

No comments: