-->
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: how to use "this" in @where clause
PostPosted: Mon Sep 30, 2013 2:57 am 
Newbie

Joined: Fri Sep 27, 2013 10:30 am
Posts: 1
I have two classes[/size]
Code:
@Entity
    public class Owner {
        @Id @GeneratedValue
        long id

@column(name="Name")
private String ownerName;

@OneToMany
@JoinColumn(name="owner_id", insertable=false, updatable=false)
@Where(clause="Owner_name=this.Name")
Private List<Cat> cats
}



@Entity
    public class Cat {
     @column(name="Owner_name")
     private String ownerName
}



i want to use this instance i.e., owner instance in @where clause like above. Is it possible??


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.