Bug 401581 - EclipseLink nosql does not recognize unique constrains with mongodb
Summary: EclipseLink nosql does not recognize unique constrains with mongodb
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P2 critical with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: mongodb
Keywords: consistency, core, noteworthy
Depends on:
Blocks:
 
Reported: 2013-02-22 19:15 EST by Jürgen Stadler CLA
Modified: 2022-06-09 10:33 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Stadler CLA 2013-02-22 19:15:06 EST
When adding a unique constraint like  db.users.ensureIndex({username: 1}, {unique: true}) the entity manager just ignores this when persisting an entry with a conflicting username.
Comment 1 Jürgen Stadler CLA 2013-02-22 19:18:13 EST
The mongo-db-driver used is version 2.10.0
Comment 2 Tom Ware CLA 2013-04-03 09:00:15 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 3 James Sutherland CLA 2013-05-27 10:40:50 EDT
Does Mongo throw an error for this constraint?  If Mongo does not validate constraints, there is nothing EclipseLink can do.

Check your log, are there any errors?
Comment 4 jm collin CLA 2013-05-27 11:29:19 EDT
Hi James,

> Check your log, are there any errors?

No, there is no error. The instruction is ignored. It may be a very insteresting feature to add if possible.

JM.
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:33:28 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink