-->
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: Need help for a query with output from two entity
PostPosted: Fri May 09, 2014 1:28 pm 
Newbie

Joined: Thu Mar 11, 2010 6:30 am
Posts: 2
I have a Query with three Entitys: a) Employee b) Customer c) Mandatory

Each Employee has a Mandatory (employee.mandatory_fk) Each Customer has a Mandatory (customer.mandatory_fk)

Every Employee and Customer has a Birthdate. Now I want to get all Customer and Employee of a Mandatory.

This is my query: select e, c from Employee e, Customer c WHERE c.mandatory.id = 1 OR e.mandatory.id = 1

But the current problem is: I got only one row? But for example: I have one employee and one customer: I want to have to rows (one row for the customer and one row for the employee)

How can I do this? Where is the issue in my query?

Thank you for your help


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.