[Hibernate-JIRA] Created: (HHH-4505) Constraing Violation while using Map
by Rammohan Yadavalli (JIRA)
Constraing Violation while using Map
------------------------------------
Key: HHH-4505
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4505
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.2.3
Reporter: Rammohan Yadavalli
Hi, I am using 3.2.3 version and the database is Oracle 10g. I have a class in which one of the property is a Map, the mapping definition given below:
<subclass name="com.cms.model.Backgrounder"
discriminator-value="Backgrounder">
<property name="headerImage" type="java.lang.String">
<column name="BG_HDRIMG" length="128" />
</property>
<map name="sectionTitles" table="EH_CTNT_BGR_SECTIONS"
lazy="false">
<key column="ITEM_ID" />
<map-key type="string" column="BG_SECTN_NO" />
<element type="string" column="BG_SECTN_TITL" />
</map>
</subclass>
While I can save (insert) NULL values in BG_SECTN_TITL, later, when I retrieve the records of sectionTitles, modify the BG_SECTN_TITL and then save them, I am getting a "Constraint Violation" exception. May be Hibernate is trying to insert instead of Update.
I saw a similar issue logged HHH-726 but here List is being used. Does the same explanation holds good for Map too?
Is this issue fixed in later versions? if yes please let me know the version in which this issue is fixed.
Please advise.
Thanks,
Ram
--
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, 2 months
[Hibernate-JIRA] Created: (HHH-4500) MSSQL, Oracle - Mapping inconsistency
by Strong Liu (JIRA)
MSSQL, Oracle - Mapping inconsistency
-------------------------------------
Key: HHH-4500
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4500
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 3.5.0.Beta-1, 3.3.2, 3.2.4
Environment: ms sql, oracle
Reporter: Strong Liu
Assignee: Strong Liu
Fix For: 3.5
There's a mapping inconsistency when using MSSQL and @Type(type="text"). When creating the table, the field gets created as "text", but when issuing a delete, it set's the field as varchar, by which the MSSQL driver returns: The data types text and nvarchar are incompatible in the equal to operator.
Model: org.hibernate.test.annotations.entity.Forest , property longDescription
Sample test: org.hibernate.test.annotations.entity.BasicHibernateAnnotationsTest#testType
--
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, 2 months