-->
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: HowTo Join Columns from a view into Hibernate-Entities
PostPosted: Tue Jul 16, 2013 8:58 pm 
Newbie

Joined: Tue Jul 16, 2013 8:40 pm
Posts: 1
Hi!
I'm quite new to Hibernate and not sure for what I have to look for...

I created some Entity-Objects which fetch the data of my desire from the database (MSSQL 2012). There are ~100 rows of "mixed materials" which refer with an String-Foreign-Key to the Article-View which has about 20.000 rows.
I don't want to persist this article view (I don't want and I can't change anything there anyway), also it's too much I guess, it's enough just to fill the "fewer" mixed-material objects.

So in SQL I'd do it like this:

Code:
SELECT MM_ID, FK_ArtNr, Information, Articles.Price, Articles.Name, Articles.Series
FROM MixedMaterials
inner join Articles
on FK_ArtNr=ArtNr


What is the best solution?
Thank you!! :)


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.