Change By: Strong Liu (07/Jan/13 8:25 AM)
Description: I have an entity. It has the following field,
{code}
@Formula("adi||' '||soyadi")
private String adiSoyadi;
public String getAdiSoyadi() {
  return this.adiSoyadi;
}
//Tested with removing this also
public void setAdiSoyadi(final String adiSoyadi) {
  this.adiSoyadi = adiSoyadi;
}
{code}
If i include this column the Query raises below error;
{code}
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:43)
at org.hibernate.loader.custom.sql.SQLQueryReturnProcessor.generateCustomReturns(SQLQueryReturnProcessor.java:198)
at org.hibernate.loader.custom.sql.SQLCustomQuery.<init>(SQLCustomQuery.java:152)
at org.hibernate.engine.query.spi.NativeSQLQueryPlan.<init>(NativeSQLQueryPlan.java:67)
at org.hibernate.engine.query.spi.QueryPlanCache.getNativeSQLQueryPlan(QueryPlanCache.java:197)
at org.hibernate.internal.AbstractSessionImpl.getNativeSQLQueryPlan(AbstractSessionImpl.java:223)
at org.hibernate.internal.AbstractSessionImpl.list(AbstractSessionImpl.java:229)
{code}
If i remove the Formula it works.
Please find attached debug screenshot.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira