Property « Search « JPA Q&A





1. (N)Hibernate.Search : Index different properties in one field    stackoverflow.com

When I was using Lucene to index my entities, I had the habit of putting all my indexed properties in a field named "all", to perform a search on "all" of ...

2. Using Hibernate Search over 2 subclasess with a shared property    stackoverflow.com

I have the following data model:

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class AbstractRecord
    implements Serializable
{
    ...
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE)
  ...

3. Criteria search possible on sub-properties?    forum.hibernate.org

Hi all, I have three objects A, B and C. A has a property B and B has a property C and C has a property 'id". I want to use a Criteria query to perform the equivalent of "select * from A where A.B.C.id = 7" Is this possible, or even desirable? Are there better alternatives? I've spent some time ...

5. "Property not found" when search by criteria in Ma    forum.hibernate.org

org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: owner.city.country.id of: Car; nested exception is org.hibernate.QueryException: could not resolve property: owner.city.country.id of: Car org.hibernate.QueryException: could not resolve property: owner.city.country.id of: Car at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44) at org.hibernate.persister.entity.AbstractPropertyMapping.toColumns(AbstractPropertyMapping.java:59) at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:31) at org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.java:1350) at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:434) at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection(CriteriaQueryTranslator.java:394) at org.hibernate.criterion.SimpleExpression.toSqlString(SimpleExpression.java:45) at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:334) at org.hibernate.loader.criteria.CriteriaJoinWalker.(CriteriaJoinWalker.java:82) at org.hibernate.loader.criteria.CriteriaLoader.(CriteriaLoader.java:67) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.springframework.orm.hibernate3.HibernateTemplate$37.doInHibernate(HibernateTemplate.java:988) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366) at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:978) at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:971)

6. Criteria search against many-to-many set property?    forum.hibernate.org

How do I set a restriction against an entity where the property is a set of subordinate classes? In this case I have a parent entity 'FullExpertise' that has a set property consisting of one or more 'Keyword' instances. My search is to find all the 'FullExpertise' instances that have a link to a Keyword with an nominated keyword ID, like... ...