[jboss-jira] [JBoss JIRA] Created: (HIBERNATE-106) Criteria + Example + Projections = "Y1_": invalid identifier

Krasimir Goutcev (JIRA) jira-events at lists.jboss.org
Fri Oct 3 08:15:21 EDT 2008


Criteria + Example + Projections = "Y1_": invalid identifier
------------------------------------------------------------

                 Key: HIBERNATE-106
                 URL: https://jira.jboss.org/jira/browse/HIBERNATE-106
             Project: Hibernate
          Issue Type: Bug
         Environment: Hibernate 3.3.1
Oracle 10
Sun JVM 1.5
            Reporter: Krasimir Goutcev
            Assignee: Steve Ebersole


When trying someting like this:

SystemClassif sc=new SystemClassif();
//sc.setTekst("присъствал");
sc.setTekst("123");

Example sample=Example.create(sc).enableLike(MatchMode.ANYWHERE);
session.createCriteria(SystemClassif.class).setProjection(
						Projections.projectionList()
						.add(Projections.property("code"),"code")
						.add(Projections.property("tekst"),"tekst")	
							).add(sample);
		
hibernate trying to execute this SQL:

select this_.ID as y0_, this_.TEKST as y1_ from SP.ADM_SYSTEM_CLASSIF this_ where (y1_ like ?)
and throus exception:
            ORA-00904: "Y1_": invalid identifier

this happen only if we using Example AND property name AND alias are identical strings.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the jboss-jira mailing list