I have a MASTER and a DETAIL table in an 1:n association.
Master.java has
Code:
private Set<Detail> details
Details.java has
Code:
private Master master
plus all the setters and getters one might expect; nothing surprising there.
I now want to generate different setters via Freemarker and PojoPropertyAccessors.ftl: Details#setMaster should also update the details set in the associated Master pojo, something like this (leaving out some code that checks for proxied state and such):
Code:
public void setMaster (Master master){
this.master.getDetails ().remove (this);
this.master = master;
this.master.getDetails ().add (this);
}
Now my problem is: How can PojoPropertyAccessors.ftl find out the name of the "details" property?
I have spent half a week writing Freemarker dump code just to get a list of available properties and methods in c2h, property, property.type, and property.type.value, but nowhere do I find a way to get hold of the backlink property. Did I overlook something, or is that information indeed unavailable?