Issue Type: Bug Bug
Affects Versions: 4.1.6
Assignee: Unassigned
Attachments: hibernateFormula.png
Components: annotations, entity-manager
Created: 15/Aug/12 3:16 AM
Description:

I have an entity. It has the following field,
@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; }
If i include this column the Query raises below error;
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)
If i remove the Formula it works.
Please find attached debug screenshot.

Environment: Hibernate EntityManager 4.1.6.Final, JDK 1.6.32 on Windows 7, Oracle 11g
Project: Hibernate ORM
Labels: hibernate-entitymanager
Priority: Blocker Blocker
Reporter: Hakan Junior
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