public class ProjectionBean
extends org.hibernate.criterion.ProjectionList
Constructor and Description |
---|
ProjectionBean(List<String> fields,
boolean autoAliasing) |
Modifier and Type | Method and Description |
---|---|
static org.hibernate.criterion.ProjectionList |
beanFieldList(Class<?> clazz,
String[] ignoreFields,
boolean autoaliasing) |
static org.hibernate.criterion.ProjectionList |
fieldList(List<String> fieldList,
boolean autoaliasing) |
public static org.hibernate.criterion.ProjectionList fieldList(List<String> fieldList, boolean autoaliasing)
fieldList
- a list of fields to retrieve Important Note : the
projection are automatically aliased with the same name,
you could have some problems when using restriction
(column yX_ doesn't exists) see
http://opensource.atlassian.com/projects/hibernate/browse/HHH-817.
To avoid this problem you could disable aliasing .public static org.hibernate.criterion.ProjectionList beanFieldList(Class<?> clazz, String[] ignoreFields, boolean autoaliasing)
clazz
- the class to inspect to retrieve the fieldsignoreFields
- an array of fields that should be ignoreautoaliasing
- if the fields should be auto-aliased See important note
aboveCopyright © 2015. All rights reserved.