-->
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: Projection of an implicit association
PostPosted: Fri Aug 14, 2009 12:47 pm 
Newbie

Joined: Thu Sep 04, 2008 5:36 pm
Posts: 2
Location: Buenos Aires
Hello all,

I have two classes that are related but the first class only has the id of the second, and not a proper field. For example:

Code:
class Foo {
    int id;
    int barId;
}

class Bar {
    int id;
    String name;
}


The mapping of Foo has a simple property for barId.
I have to write a query on Foo using a DetachedCriteria if possible, and I need to have a Projection for Bar.name. Unfortunately I am not allowed to modify the classes. I am allowed to modify the mapping if I need to.

Is there a way to do this?

Thanks in advance,
Tomás


Top
 Profile  
 
 Post subject: Re: Projection of an implicit association
PostPosted: Mon Oct 12, 2009 3:04 am 
Newbie

Joined: Mon Oct 12, 2009 3:01 am
Posts: 3
DId u get any answer for this. I also have the same issue. Using projection I am not able to get the associated objects.


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.