-->
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: Problem with Formula in many-to-one Relationship
PostPosted: Sat Mar 15, 2008 5:53 am 
Newbie

Joined: Wed Feb 20, 2008 2:14 am
Posts: 4
Location: India
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: Hibernate3.2.5 ga

Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.ball.Ball" table="my_table" lazy="false" dynamic-insert="true" dynamic-update="true">
<id name="ballNumber" column="ball_no">
<generator name="assign"/>
</id>
<many-to-one name="bag" class="org.Bag">
<column name="No"/>
<formula>'A'</formula>
</class>
</hibernate-mapping>


when ever i am using formula in the Mapping if the parent is not there also it is inserting in the DB. but in actual case it shouldn't. And i want to assign a ball to Bag name whose Name is 'A'.

Is there is any other way to do this.

Please help me....:

Read this: http://hibernate.org/42.html

_________________
Romender


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.