These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hibernate manytomany join - persist problem.
PostPosted: Tue Feb 15, 2011 6:36 pm 
Newbie

Joined: Tue Feb 15, 2011 4:45 pm
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.