I have been learning to use appfuse recently and have really liked creating tables from hibernate xdoclet tags. I am stumped on this one though. The following tables map a normal many-many relationship using an association table. Below the table definitions is what I would like my classes to be like. How would I get xdoclet to generate these tables based on the class definitions below?
Regards,
Joshua
Code:
TEAM TEAM_MODULE_ASSOC MODULE
---------- ----------------- ----------
id (PK) team_id (PK) id (PK)
name module_id (PK) name
enabled
public class Team {
private Integer id;
private Set modules = new HashSet();
...
public getModules() {
return this.modules;
}
public setModules(Set modules) {
this.modules = modules;
}
}
public class Module {
private Integer id;
private String name;
private boolean enabled;
public isEnabled() {
return this.enabled;
}
public setEnabled(boolean enabled) {
this.enabled = enabled;
}
}