I am trying to develop a web application using spirng+hibernate and Jpa. curretly i am facing a problem persisting data. I am trying to add a new student record into my database. The structure is some what like below.
I have total 6 tables Table_A, Table_B, Table_C, Table_D, Table_E, Table_F
Table A is joined with Table B using @PrimaryKeyJoinColumn ID_AB Table B does @ManyToMany @Cascade(value = { CascadeType.PERSIST}) @JoinTable( name="TABLE_C" , joinColumns={ @JoinColumn(name="ID_AB", referencedColumnName="ID_AB") } , inverseJoinColumns={ @JoinColumn(name="ID_C", referencedColumnName="ID_D") } ) protected List<TableE> tableE;
TableE is joined with Table D using @ForeignKey(name="ID_D") Table E does a uni directional one to one association with Table F @OneToOne @Cascade(value = { CascadeType.ALL }) @JoinColumn(name="ID_EF") private TableF tableF;
on my jsp form I have coded something like this
<form:label path="tableE[0].colunmName">LabelName</form:label> <form:input path="tableE[0].colunmName"/><br> does not work. and it gives me an invadi property "tableE[0].colunmName" error.
I am new new to hibernate. any kind of help would be appreciated. Thanks in advance Rudy
|