|
Hi Guys,
I have a small problem with many-to-one relationship.
I have a table called inputs which has many-to-one relationship with a table called webpages, now an input can either have a webpage or a null value,
i can save it in the database in either case but when i try to delete an input with null webpage value it throws a TransientObjectException saying that webpage which is null has not been saved,
Here is the mapping,
input.hbm.xml has this
<many-to-one name="webPage" class="WebPage" column="webpage_id" not-found="ignore" not-null="false" cascade="none" />
and i am doing s.saveOrUpdate(input);
i suspect it to be coz of cascade="none", but not sure whats the work around,
I will really appreciate any help.
cheers,
Adnan
|