Hi, Same here, Whenever you add a formula clause to a mapping and, at the same time, add the mapped object as entity for a SQL Query, the exception is shown: Caused by: java.lang.NullPointerException at org.hibernate.loader.DefaultEntityAliases.intern(DefaultEntityAliases.java:193) at org.hibernate.loader.DefaultEntityAliases.getSuffixedPropertyAliases(DefaultEntityAliases.java:151) at org.hibernate.loader.DefaultEntityAliases.determinePropertyAliases(DefaultEntityAliases.java:93) at org.hibernate.loader.DefaultEntityAliases.<init>(DefaultEntityAliases.java:65) at org.hibernate.loader.ColumnEntityAliases.<init>(ColumnEntityAliases.java:45) at org.hibernate.loader.custom.sql.SQLQueryReturnProcessor.generateCustomReturns(SQLQueryReturnProcessor.java:19 7) at org.hibernate.loader.custom.sql.SQLCustomQuery.<init>(SQLCustomQuery.java:152) at org.hibernate.engine.query.NativeSQLQueryPlan.<init>(NativeSQLQueryPlan.java:67) at org.hibernate.engine.query.QueryPlanCache.getNativeSQLQueryPlan(QueryPlanCache.java:140) at org.hibernate.impl.AbstractSessionImpl.getNativeSQLQueryPlan(AbstractSessionImpl.java:160) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:179) |