[Hibernate-JIRA] Updated: (HHH-951) setMaxResults causes "ORA-00918: column ambiguously defined" exception
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-951?page=co... ]
Gail Badner updated HHH-951:
----------------------------
Affects Version/s: 3.5.3
3.6.1
> setMaxResults causes "ORA-00918: column ambiguously defined" exception
> -----------------------------------------------------------------------
>
> Key: HHH-951
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-951
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5, 3.1 beta 2, 3.5.3, 3.6.1
> Environment: hibernate3.0.5, hibernate3.1b2, Oracle 9
> Reporter: Karel Sommer
> Attachments: Hibernate_SQL_HHH-5579.txt, Hibernate_StackTrace_HHH-5579.txt, TestCase_for_Hibernate_Core_Issue_HHH-5579.zip
>
>
> when create criteria with associations, i get this error:
> ORA-00918: column ambiguously defined
> mapping:
> <class name="User" table="FRAME_USER" dynamic-update="true" dynamic-insert="true">
> <id name="id" type="long" unsaved-value="null">
> <column name="ID" not-null="true"/>
> <generator class="sequence">
> <param name="sequence">frame_user_seq</param>
> </generator>
> </id>
> <version type="timestamp" column="stamp" name="timestamp" unsaved-value="null"/>
> <property name="user_name" type="string" not-null="true"/>
> <property name="blocked" type="yes_no" not-null="true"/>
> <property name="access_logon" type="timestamp"/>
> <property name="denied_logon" type="timestamp"/>
> <property name="inactivity_time" type="long"/>
> <property name="session_count" type="long"/>
> <idbag name="terminalGroups" table="FRAME_USER_TERMINAL" fetch="join" outer-join="true">
> <collection-id column="ID" type="long">
> <generator class="sequence">
> <param name="sequence">frame_user_terminal_seq</param>
> </generator>
> </collection-id>
> <key column="id_user"/>
> <many-to-many column="id_terminal_groups" class="TerminalGroup" fetch="join" outer-join="true"/>
> </idbag>
> </class>
> <class name="TerminalGroup" table="FRAME_TERMINAL_GROUPS" dynamic-update="true" dynamic-insert="true">
> <id name="id" type="long" unsaved-value="null">
> <column name="ID" not-null="true"/>
> <generator class="sequence">
> <param name="sequence">frame_terminal_groups_seq</param>
> </generator>
> </id>
> <version type="timestamp" column="stamp" name="timestamp" unsaved-value="null"/>
> <property name="name" column="group_name" type="string" not-null="true"/>
> <idbag name="terminals" table="FRAME_TERMINAL_REL" fetch="join" outer-join="true">
> <collection-id column="ID" type="long" >
> <generator class="sequence">
> <param name="sequence">frame_terminal_rel_seq</param>
> </generator>
> </collection-id>
> <key column="id_term_group"/>
> <many-to-many column="id_term" class="Terminal" fetch="join" outer-join="true"/>
> </idbag>
> </class>
> <class name="Terminal" table="FRAME_TERMINAL" where="status != 'D'" dynamic-update="true" dynamic-insert="true">
> <id name="id" type="long" unsaved-value="null">
> <column name="ID" not-null="true"/>
> <generator class="sequence">
> <param name="sequence">frame_terminal_seq</param>
> </generator>
> </id>
> <version type="timestamp" column="stamp" name="timestamp" unsaved-value="null"/>
> <property name="status" type="char" not-null="true"/>
> <property name="mac" type="string" not-null="true"/>
> <property name="name" column="ident" type="string" not-null="true"/>
> <property name="description" type="string"/>
> code:
> session.createCriteria(User.class)
> .add(Restrictions.like("user_name", "%")
> .createCriteria("terminalGroups")
> .add( Restrictions.like("group_name", "%").
> .setProjection(Projections.rowCount())
> .uniqueResult();
--
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
13 years, 11 months
[Hibernate-JIRA] Created: (HHH-5896) hibernate-entitymanager jar issue with Maven 3
by Javed Mandary (JIRA)
hibernate-entitymanager jar issue with Maven 3
-----------------------------------------------
Key: HHH-5896
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5896
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.1, 3.6.0, 3.5.1
Reporter: Javed Mandary
Hi,
I would seem that if you include the hibernate-entitymanager (3.6.1) dependency within your maven build and your using Maven 3 , this pulls the hibernate-3.2.5.ga.jar within your classpath somehow.
Eventually what happens is that if you try to run your application within say tomcat and that bundles the hibernate-entitymanager jar as well as the hibernate-3.2.5.ga.jar you get the following exception:
Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)
Solution which I've found is to move down to maven 2 or to expliclty or manually remove the hibernate-3.2.5.ga.jar from your build.
--
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
13 years, 11 months
[Hibernate-JIRA] Created: (HHH-5566) Clob column are not getting updated, even if there is real updated in the Clob data, when we do merge operation
by Srinivasa Rao Yedluri (JIRA)
Clob column are not getting updated, even if there is real updated in the Clob data, when we do merge operation
---------------------------------------------------------------------------------------------------------------
Key: HHH-5566
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5566
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: Spring2.5.6, Hibernate3.3.2, Weblogic10.3.1, Red Hat Linux, Oracle10G
Reporter: Srinivasa Rao Yedluri
Below is the hbm file snippet
<hibernate-mapping>
<class name="......OrderLineDTO"
table="ORDER_LINES" dynamic-update="true">
<id name="lineId" type="long" column="LINE_ID" length="15">
<generator class="sequence">
<param name="sequence">xyz</param>
</generator>
</id>
..................................
..................................
..................
<property name="installationDetailClob" type="clob" column="ORDER_LINE_ATTRIBUTES_MAP"
not-null="false" lazy="true" />
<property name="attathmentMetadataClob" type="clob" column="ORDER_ATTACHMENT_METADATA"
not-null="false" lazy="true"/>
<!-- Associations -->
<!-- bi-directional many-to-one association to OrderHeader -->
<many-to-one name="orderHeader"
class="......"
fetch="select">
<column name="HEADER_ID" not-null="true" length="15" />
</many-to-one>
<!--
bi-directional many-to-one association to SmartHand
-->
<set name="smartHands" inverse="true" lazy="false"
cascade="all,delete-orphan">
<key>
<column name="LINE_ID" /><!-- a foreign key in SMART_HANDS referencing the primary key of this table.
-->
</key>
<one-to-many
class="...................SmartHandDTO" />
</set>
</class>
</hibernate-mapping>
DAO Code snippet:
public void update(OrderHeaderDTO orderHeaderDTO)
throws DataAccessException {
getOrdersHibernateTemplate().merge(orderHeaderDTO);
}
1. Create a table with clob column and have some other columns. Have one column with timestamp.
2. Insert a record in to it.
3. Now create detached object with new operator and populate all the information programatically including pk. Populate clob column and timestamp with different data than already persisted data.
3. Now do merg operation on this object, we find only timestamp column is part of update query but not clob column.
Please let me know if you need any more details.
--
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
13 years, 11 months