tracker issue : CF-3360524

select a category, or use search below
(searches all categories and all time range)

"unique" constraint on ORM-mapped properties not respected when DB is Derby

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 11/06/2012

Components: ORM Support

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / 286674

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

Problem Description:
I have a Derby Database, which I am using to persist ORM-mapped objects.  One of my objects has this property:
property name="email" unique=true;

This is not respected on Derby.  If I change the underlying DB to MySQL, it IS respected, thus pointing towards some problem with the way the object is mapped to the DB via CF ORM.

Derby DOES have the option of unique columns, so this is not the problem.

Steps to Reproduce:
As per above

Actual Result:
CF allows me to create objects with duplicated column values when the column is supposed to have a unique constraint on it

Expected Result:
For it to work as described

Any Workarounds:
Write a bunch of unnecessary code to roll my own support for this, wasting my time.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3360524

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:



This is a derby issue as documented at notnull="true" has to be added to the unique property for it to work on derby.
Comment by Himavanth R.
17280 | October 01, 2013 05:00:27 AM GMT
This got fixed after derby upgrade. (Comment added from ex-user id:nawani)
Comment by Adobe D.
17281 | April 07, 2014 02:29:26 AM GMT