|
|
|
When executing the following query:
{code} final QueryBuilder builder = fullTextSession .getSearchFactory() .buildQueryBuilder() .forEntity( Object.class ) .get();
Query query = builder.all().createQuery(); List<?> results = fullTextSession .createFullTextQuery( query, Object.class ) .list(); {code}
Then too many objects will be loaded from the database. Specifically, for each entity type, a statement with *all* the ids returned from the index will be issued, rather than one statement per entity type with only those ids matching the entity type.
Matters get worse when different id types are involved. This will cause {{ClassCastException}} when binding e.g. Long ids obtained from the index to statements for fetching entities with an Integer id.
When working with different id property names, I'm also randomly seeing {{QueryException}} ' s caused by rendering statements for one entity with the property name from another entity.
|
|
|
|