[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4505) Constraing Violation while using Map

Rammohan Yadavalli (JIRA) noreply at atlassian.com
Tue Oct 20 04:22:30 EDT 2009


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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list