-->
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.  [ 3 posts ] 
Author Message
 Post subject: use save in child tables
PostPosted: Wed Dec 01, 2004 2:36 am 
Newbie

Joined: Wed Dec 01, 2004 2:21 am
Posts: 12
Hibernate version:2.1

In following code,easily you can undesrtand that for inserting into a detail table we should take an instance of parents,so i feel this kind of coding has some problems.

DataTypeENT dataTypeENT = new DataTypeENT();
dataTypeENT = (DataTypeENT) persistanceManager.findByPrimaryKey(DataTypeENT.class,dto.getDttId());
dto.setDataTypeENT( dataTypeENT );

MetricENT metricENT = new MetricENT();
metricENT = (MetricENT) persistanceManager.findByPrimaryKey(MetricENT.class,dto.getImtId());
dto.setMetricENT( metricENT );

persistanceManager.add( dto );


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 01, 2004 5:59 am 
Regular
Regular

Joined: Fri Nov 12, 2004 12:07 am
Posts: 57
Location: Beijing,China
What are the problems you are feeling?


Top
 Profile  
 
 Post subject: Performance
PostPosted: Wed Dec 01, 2004 6:16 am 
Newbie

Joined: Wed Dec 01, 2004 2:21 am
Posts: 12
In this way , performance will reduce seriously.Because for every foreign key if we use a FINDBYPK it affect to performance.


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

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.