-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Object relation via id
PostPosted: Thu Apr 16, 2015 3:26 am 
Newbie

Joined: Thu Apr 16, 2015 3:20 am
Posts: 2
Hi,

I have an working hibernate solution with JAVA -> Hibernate -> SQLite.
I have different relationships with annotations.

My problem is now:

I save some objects to table1. OK.
Now I want to save some objects to table2 but table2 objects have references to table1 objects so I need to query the database to get that objects for attaching.

This takes a lot of time. At this point I have the joincolumn identifier for the table1 objects.

So my question is if there is a way to map the table1 objects unchecked and not queried via this identifier?


Top
 Profile  
 
 Post subject: Re: Hibernate Object relation via id
PostPosted: Mon Apr 27, 2015 7:35 am 
Newbie

Joined: Thu Apr 16, 2015 3:20 am
Posts: 2
Anybody?

The select statements are too slow.
I have to insert about 8k objects and each object takes about 200ms. 180ms of that time is consumed by the select statement :(

Is there no way to set the joincolumn value directly without querying the referenced object before?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.