I'm doing a search query (using criteria), using a search string like "Bruce Willis".
Code:
<class name="Actor" table="ACTORS">
<id column="ID_ACTOR" name="id" type="string">
<generator class="identity"/>
</id>
<property name="firstName" column="FIRSTNAME_ACTOR" />
<property name="lastName" column="LASTNAME_ACTOR" />
</class>
And in Java I WANT TO do this:
Code:
...
disjunction.add(Restrictions.ilike("artists.fullName", "Bruce Willis", MatchMode.START));
...
instead of
Code:
...
disjunction.add(Restrictions.ilike("artists.firstName", "Bruce", MatchMode.START));
disjunction.add(Restrictions.ilike("artists.lastName", "Willis", MatchMode.START));
...
How do I define "fullName" when I have two columns of firstName and lastName?