Property « Search « JPA Q&A

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

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

I have the following data model:

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

3. Criteria search possible on sub-properties?

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 = 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

org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: of: Car; nested exception is org.hibernate.QueryException: could not resolve property: of: Car org.hibernate.QueryException: could not resolve property: of: Car at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException( at org.hibernate.persister.entity.AbstractPropertyMapping.toColumns( at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns( at org.hibernate.persister.entity.AbstractEntityPersister.toColumns( at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns( at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection( at org.hibernate.criterion.SimpleExpression.toSqlString( at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition( at org.hibernate.loader.criteria.CriteriaJoinWalker.( at org.hibernate.loader.criteria.CriteriaLoader.( at org.hibernate.impl.SessionImpl.list( at org.hibernate.impl.CriteriaImpl.list( at org.springframework.orm.hibernate3.HibernateTemplate$37.doInHibernate( at org.springframework.orm.hibernate3.HibernateTemplate.execute( at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria( at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(

6. Criteria search against many-to-many set property?

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... ...