-->
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: Does Example#enableLike() works on components
PostPosted: Thu Jul 15, 2004 2:14 pm 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
Hi Folks,

Example class looks pretty clever to create a query with maximum restrictions e.g:

Code:
Foo foo = ...;
Session session = getSession();
Criteria critera = session.createCriteria(Foo.class);
critera.add(Example.create(foo).enableLike());      


Will the enableLike() work also on component objects

e.g

Code:

public class Foo {

    /**
      * Imagine this a property ;)
      *
      * @hibernate.component
      */
    private Bar bar;
}

public class Bar {
    /**
      * Imagine this a property ;)
      *
      * @hibernate.propery
      */
    private String name;
}


... so that enableLike() attches the like to the WHERE clause of name propery or do I have to nest the criteria for this?

Thx
Toby


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.