Home » Search

About unique

21-30 of 139Refresh
JDO Doc
56

setUnique(unique)

Method javax.jdo.Query void setUnique(   boolean unique ) Specify that only the first result of the query should be returned, rather than a collection. The execute method will return null if the query result size is 0. Parameters: unique - if true, only one element is returned Since: JDO 2.0
Forum
21

@Unique member combination not working

Why does the below code not enforce unique restrictions?   Person @Entity @Unique(members ...     @Unique(members = {"name", "surname"})     public static class Person implements Serializable ... : Unique constraint (com.objectdb.test.bug.forum.T1522$Person[name,surname]) failed: Attempt to reuse
Issue
20

Can not have unique index on Byte Array

I found that it is impossible to insert a record with @Unique byte[] var; after initial insertion ... transaction: Unique constraint (id.co.ecoin.test.objectdb.ObjectDbTest$OdbByteArray[key]) failed ... .PersistenceException: com.objectdb.o.UserException: Unique constraint (id.co.ecoin.test.objectdb.ObjectDbTest
Forum
20

How to create a Unique constraint?

Hi, I'm trying to create a unique constraint. Here is a simple example: @Entity public class Account { @Id @GeneratedValue private long id; @Index(unique="true ... if name is the same. What do I need to do to have a Unique constraint? Thanks, Carl   On a hunch, I
Forum
20

Unique contraint with 2 members

I am trying to do the following: @javax.persistence.Entity public class Account { @Unique() private String name; @Unique(members={"SalesforceID","sport"}) private String SalesforceID; private String sport; ... } The first Unique constraint works. On commit, an exception is thrown
Forum
19

@Unique added afterward is not taken into account

Hello, I encounter an issue with the @Unique annotation. The annotation was added on a given field ... were already added to the table). As a consequence the unique constraint is not taken into account when persisting ... scheme for all entities). So the question is simple, is there a better way to "re-activate" the @Unique
Forum
19

Bug with unique constraint exception not resulting in transaction roll back

I'm using ObjectDB 2.5.6_02 and running into a bug with a JDO @Unique constraint.  I'm using JPA in general. I have an EJB persisting two entities with @TransactionAttribute(TransactionAttributeType ... with the @Unique constraint. The unique constraint causes an exception as expected, but I would expect
Issue
19

Unique Constraint Ignored

If i annotate a getter with: @Column(unique = true) it's simply ignored. If i use @Unique it works perfectly. Usually ObjectDB silently ignores ORM annotations. This is not a bug ... unique by using the @Column annotation is now supported (starting build 2.3.2_04). mosi0815
Manual
18

Auto Generated Values

a primary key for every new entity object. These generated values are unique at the database level ... identity generator is managed per type hierarchy, so generated values are unique only per type
FAQ
18

Is ObjectDB better than competing object databases?

: ObjectDB is unique in supporting the standard APIs. It is the only object database with built in support ... community, forums, IDEs support, tools, books, tutorials and sample code. ObjectDB is also unique in