[Hibernate-JIRA] Closed: (HHH-1146) latest cvs(11/10/05) hibernate3 issue with classic query
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1146?page=c... ]
Steve Ebersole closed HHH-1146.
-------------------------------
Closing stale resolved issues
> latest cvs(11/10/05) hibernate3 issue with classic query
> ---------------------------------------------------------
>
> Key: HHH-1146
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1146
> Project: Hibernate Core
> Issue Type: Bug
> Environment: latest CVS from date 11/10/05
> Reporter: user1
> Assignee: Steve Ebersole
> Priority: Minor
> Fix For: 3.1 rc3
>
>
> I just took latest cvs hibernate3. I am using classic query - and the queries that used to work, doesn't work with this latest. It gives an error saying :
> java.lang.UnsupportedOperationException: select clause aliases ar
> e not supported by classic parser
> at org.hibernate.hql.classic.QueryTranslatorImpl.getReturnAliases(QueryTranslatorImpl.java:230)
> at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:95)
> at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:52)
> at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
> at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:108)
> at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:88)
> please, can this be fixed? I need to use the latest cvs due to some bugs that got fixed and I need to implement this newly build hibernate3.jar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Closed: (HHH-1127) HQL's special use of the "id" property name interferes with user Object models
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1127?page=c... ]
Steve Ebersole closed HHH-1127.
-------------------------------
Closing stale resolved issues
> HQL's special use of the "id" property name interferes with user Object models
> ------------------------------------------------------------------------------
>
> Key: HHH-1127
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1127
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Environment: Hibernate HQL in all of its versions up to the recent version 3.1
> Reporter: Gunther Schadow
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> When a user decides to use the name "id" as the name of a property, HQL queries break with unspecific exceptions, because HQL assumes "id" as reserved for the Hibernate id attribute defined in the hbm file using the <id .../> tag. This is bad design in our view, because it puts an unnecessary constraint and interference with the otherwise transparent "object persistence for idiomatic Java."
> For example, a mapping file may contain:
> <class name="MyObject">
> <id name="internalId" ... />
> <property name="id" .../>
> <property name="foo" .../>
> </class>
> now I like to make an HQL query
> from MyObject where id='123'
> and this would fail because 'id' in HQL means the 'internalId' property not the property called 'id'.
> I could hack org.hibernate.persister.entity.EntityPersister, changing line
> public static final String ENTITY_ID = "id";
> to
> public static final String ENTITY_ID = "hid";
> But that of course is breaking it for anyone who uses "hid" as a normal property name.
> I think the flaw here is that HQL should use the hbm metadata to take the attribute designated as by
> the class/id/@name attribute in the mapping file rather than using this static constant "id" literal.
> The following classes use the ENTITY_ID constant:
> hql/ast/tree/DotNode.java
> hql/ast/tree/FromElement.java
> hql/ast/tree/FromElementType.java
> hql/classic/PathExpressionParser.java
> persister/entity/AbstractEntityPersister.java
> persister/entity/AbstractPropertyMapping.java
> persister/entity/EntityPersister.java
> and most of the work would be in PathExpressionParser, for someone who knows this it should
> not take more than a day to fix.
> The problem is that it would break backward compatibility with existing HQL queries. But there is really no alternative than to make the change, because either you keep it a perpetual problem for new users or you make it a short term problem for old users. One might consider using some special symbol, such as "@id" to stand as an alias for the actual name of the id property. That would make conversion really easy.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Closed: (HHH-1028) After upgrading to 3.1-rc1 from beta3 I am getting the following exception.
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1028?page=c... ]
Steve Ebersole closed HHH-1028.
-------------------------------
Closing stale resolved issues
> After upgrading to 3.1-rc1 from beta3 I am getting the following exception.
> ---------------------------------------------------------------------------
>
> Key: HHH-1028
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1028
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc 1
> Reporter: Keith Garry Boyce
> Assignee: Steve Ebersole
> Priority: Critical
>
> After upgrading to 3.1-rc1 from beta3 I am getting the following exception. I don't have a test case but I am merely reporting and issue I saw with upgrade. When reverting to beta3 jar problem goes away.
> 2005-10-08 19:12:58,426 INFO [Thread-73] org.springframework.orm.hibernate3.HibernateTransactionManager - Could not access JDBC connection of Hibernate session
> org.hibernate.SessionException: Session is currently disconnected
> at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:134)
> at org.hibernate.jdbc.JDBCContext.userConnection(JDBCContext.java:125)
> at org.hibernate.impl.SessionImpl.connection(SessionImpl.java:366)
> at org.springframework.orm.hibernate3.HibernateTransactionManager.doCleanu
> pAfterCompletion(HibernateTransactionManager.java:548)
> at org.springframework.transaction.support.AbstractPlatformTransactionMana
> ger.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:645)
> at org.springframework.transaction.support.AbstractPlatformTransactionMana
> ger.commit(AbstractPlatformTransactionManager.java:470)
> at org.springframework.transaction.interceptor.TransactionAspectSupport.do
> CommitTransactionAfterReturning(TransactionAspectSupport.java:258)
> at org.springframework.transaction.interceptor.TransactionInterceptor.invo
> ke(TransactionInterceptor.java:67)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Re
> flectiveMethodInvocation.java:144)
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicA
> opProxy.java:174)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years