Hi all,
I am quite new to appfuse. For one i have succesfully generated &
started new application with archetype spring, mvc, hibernate (simple),
generated pojos and application for new tabes but I am stuck with problem
how to solve edition (best select field ) of foreign key
I have generated model like that:
@Entity
@Table(name = "office_trial", schema = "public")
public class OfficeTrial extends BaseObject implements java.io.Serializable {
/../
private Set<OfficeTrialNote> officeTrialNotesForIdTrial = new
HashSet<OfficeTrialNote>(0);
/../
@OneToMany(fetch = FetchType.LAZY, mappedBy = "officeTrialByIdTrial")
public Set<OfficeTrialNote> getOfficeTrialNotesForIdTrial() {
return this.officeTrialNotesForIdTrial;
}
public void setOfficeTrialNotesForIdTrial(
Set<OfficeTrialNote> officeTrialNotesForIdTrial) {
this.officeTrialNotesForIdTrial = officeTrialNotesForIdTrial;
}
}
@Entity
@Table(name = "office_trial_note", schema = "public")
public class OfficeTrialNote extends BaseObject implements
java.io.Serializable {
private OfficeTrial officeTrialByIdTrial;
/../
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "id_trial", nullable = false)
public OfficeTrial getOfficeTrialByIdTrial() {
return this.officeTrialByIdTrial;
}
public void setOfficeTrialByIdTrial(OfficeTrial officeTrialByIdTrial) {
this.officeTrialByIdTrial = officeTrialByIdTrial;
}
}
For one - I am not sure if model is correctly (for appfuse generation) defined.
I have found following in jsp form:
<!-- todo: change this to read the identifier field from the other pojo -->
<s:select name="officeTrialNote.officeTrialByIdTrial.id"
list="officeTrialByIdTrialList" listKey="id"
listValue="id"></s:select>
What shall I do with that?
regards
Wojtek
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]