History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: COR-178
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Travis Reeder
Votes: 16
Watchers: 10
Operations

If you were logged in you would be able to see more operations.
db4o Core

constraints for unique fields

Created: 30/Aug/06 08:32 PM   Updated: 18/Jul/08 03:56 PM
Component/s: None
Affects Version/s: None
Fix Version/s: Canada - v6.2

Time Tracking:
Not Specified

Issue Links:
Dependencies
 
Related
 

Resolution Date: 15/Mar/07 02:28 PM
First Response Date: 30/Nov/06 01:32 AM
Labels:
Participants: Carl Rosenberger, Jecho, Jim Youll, Lalvarenga Lcralvarenga@gmail.com, Patrick Roemer, Pham Huu Le Quoc Phuc, Richard Conway, Thoku Hansen and Travis Reeder
Number of Attachments: 0
Number of Comments: 10


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Pham Huu Le Quoc Phuc - 30/Nov/06 01:32 AM
I expect this future!

Jecho - 30/Nov/06 11:05 AM
Please make option for case-insensitive string comparison (if it is possible) when the indexed field is a string.

Pham Huu Le Quoc Phuc - 30/Nov/06 11:34 AM
I think this is real hard future. In SQL DB, it constraint by origin(atomic) type(int, varchar, ...).
In Db4o, I have class:
public class Address
{
   string _Phone;
   string _Street;
}

public class Employee
{
   Address _Adds;
}

How to constraint _Adds is unique?

Pham Huu Le Quoc Phuc - 01/Dec/06 01:26 AM
Can make an uniquely constraint include many fields?

Jim Youll - 02/Dec/06 07:29 PM
There's just about no mutli-threaded app (meaning, any web app) that I can build WITHOUT this capability in the collection... I can't synchronize the object-altering methods, there will be far too many firing at once to permit that. And I shouldn't have to try to build my own sync at the application level... i just need a write-if-unique-else-fail capability!

Eu tambem espero esta funcionalidade.

Patrick Roemer - 26/Jan/07 07:04 PM
Rickie.

Richard Conway - 02/Mar/07 02:42 PM
I have to agree with Jim Youll - this is a critical feature for almost any non-trivial application. Once this functionality is available, DB4O becomes a much more compelling persistence solution.

Carl Rosenberger - 15/Mar/07 02:28 PM
a first implementation is checked in to SVN.

The functionality will be available in the 6.2 release.

Thoku Hansen - 23/Mar/07 10:08 PM
It would be nice if the UniqueFieldValueConstraintViolationException were to store the class and field name as instance variables, and provide getters for them.
When inserting a large graph of objects, there may be multiple unique field constraints involved. Who knows which one might trigger the exception? A user's code might want to handle certain UniqueFieldValueConstraintViolationExceptions for one class+field, and just rethrow all others. For example, if I'm inserting a new User object, and the username has already been taken, I could rely on the constraint, and inspect the exception. If the class+field are User+userName, then I throw some other exception with a more domain-specific message like "Sorry, this username is already taken".