@Entity
| @Table(name="ModuleType")
| public class ModuleType implements Serializable {
|
| Collection<Module> modules_of_type = new HashSet<Module>();
| @Id @GeneratedValue int id;
|
| @OneToMany(cascade=CascadeType.REMOVE,mappedBy="type")
| public Collection<Module> getModules() {
| return modules_of_type;
| }
|
| public void setModules(Collection<Module> modules) {
| this.modules_of_type = modules;
| }
|
| @Column(name="TYPE_ID")
| public int getId() {
| return id;
| }
| public void setId(int id) {
| this.id = id;
| }
| }
|
|
| @Entity
| @Table(name="Module")
| public class Module implements Serializable{
| int moduleID;
| @Id
| @GeneratedValue
| public int getModuleID() {
| return moduleID;
| }
| public void setModuleID(int moduleID) {
| this.moduleID = moduleID;
| }
| @ManyToOne
| @JoinColumn(name="TYPE_ID",nullable=false)
| public ModuleType getType() {
| return type;
| }
|
| public void setType(ModuleType type) {
| this.type = type;
| }
| }
I am getting the following errors:
Caused by: org.hibernate.MappingException: Could not determine type for:
java.util.Collection, for columns:
[org.hibernate.mapping.Column(modules_of_type)]
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925858#3925858
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925858
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user