ObjectDB Database Search

51-100 of 200 results

Changing Primary Key

that, and query the table all the PK fields are null or 0.  What can I do to modify primary keys ?     Trianglehead Json Error ObjectDB doesn't support changing primary keys , as it may break

Primary key generation problem after changing entity package

to reuse an existing primary key value... My primary keys are annotated as shown below : @Id

remove & persist in same transaction => Attempt to reuse an existing primary key value

to reuse an existing primary key value (Persist_Remove_Persist$EntityA:1)   We created a small ... removing an entity object and then in the same transaction persisting another object with the same primary key of the removed object. Obviously a possible workaround is to update the object instead

Merge Issue: Attempt to reuse an existing primary key value

an existing primary key value (MyTestCase$MyEntityChild:'child1') at com.objectdb.o ... test case, i am pretty sure that "Attempt to reuse an existing primary key value" on my merge

Query on Embedded Primary Key?

Hi, I am trying to use Embedded Primary Key - but seems I can't retrieve them correctly with the query below - the query seem to work fine for other field (in the code = primkeycopy). The error I get when is below - it complains about a casting issue. Let me know how to fix

Uninitialized primary key (id = 0)

Exception in thread "main" [ObjectDB 2.2.9_04] javax.persistence.RollbackException Failed to commit transaction: Attempt to reuse an existing primary key value (image.Meta:0) (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:277) I check the db by explorer.jar, and find the only one record

Internal ObjectDB error by read the primary key

Internal ObjectDB error by read the primary key

Inserted entities with strings as keys and indices needs more and more ram memory in comparing to primitive integers as keys and indices

Hello, I have a problem with inserting of many entities. We use strings as primary key and indices ... ? See both examples. btc_es BTC EmbeddedSystems Correction. The case with strings as primary key ... programs demonstrate well that automatic  long primary keys are indeed much more efficient

Object creation in the Explorer requires automatically set primary keys

The feature of creating new objects in the Explorer is currently supported only for entity classes that have primary keys that are set automatically. support Support

Merge throw exception "Attempt to reuse an existing primary key value"

Hi, if Id = 0 I got javax.persistence.EntityExistsException: com.objectdb.o.UserException: Attempt to reuse an existing primary key value (ru.dz.train.test.ZeroIdTest$MyEntity:0)   if Id=1 no exception code : import javax.persistence.*; public class ZeroIdTest {     public

jakarta.persistence.Entity

, a one-to-one association usually maps to a unique foreign key relationship (sometimes using a shared primary key ... class must have at least one field or property annotated Id or EmbeddedId holding the primary key ... interface may not be designated as an entity. An entity has a primary table, mapped using the Table

jakarta.persistence.Table

by the Column and JoinColumn annotations and constraints entailed by primary key mappings. Defaults ... that it is not necessary to specify an index for a primary key , as the primary key index is created automatically ... : Annotation Target: Type Specifies the primary table mapped by the annotated entity type. Additional tables

jakarta.persistence.OneToOne

maps a unique foreign key relationship, either a foreign key column or columns with a unique constraint, or a relationship via a shared primary key . The JoinColumn annotation may be used to map ... primary key values. // On Employee class: @Entity public class Employee { @Id Integer id; @OneToOne

jakarta.persistence.CollectionTable

(Optional) The foreign key columns of the collection table which reference the primary table of the entity ... primary key column.) However, if there is more than one join column, a JoinColumn annotation ... the generation of a foreign key constraint for the columns corresponding to the joinColumns element

jakarta.persistence.OrderBy

, ordering by the primary key of the associated entity is assumed. The property or field name ... = "students") @OrderBy // ordering by primary key is assumed public List getCourses() { ... } ... } Example 3 ... specified, ordering by the primary key of the associated entity is assumed. Default

jakarta.persistence.MapKey.name

of the persistent field or property of the associated entity that is used as the map key . Default: If the name element is not specified, the primary key of the associated entity is used as the map key . If the primary key is a composite primary key and is mapped as IdClass , an instance of the primary

jakarta.persistence.PrimaryKeyJoinColumn.name

) The name of the primary key column of the current table. Defaults to the same name as the primary key column of the primary table of the superclass ( JOINED mapping strategy); the same name as the primary key column of the primary table ( SecondaryTable mapping); or the same name as the primary

jakarta.persistence.PrimaryKeyJoinColumn.referencedColumnName

referencedColumnName (Optional) The name of the primary key column of the table being joined to. Defaults to the same name as the primary key column of the primary table of the superclass ( JOINED mapping strategy); the same name as the primary key column of the primary table ( SecondaryTable mapping); or

SSL Configuration

includes general details (such as a company name), an RSA private key , and its corresponding public key . The SSL protocol uses the RSA algorithm for key exchange. A truststore file that contains ... file and contains the public key certificate but not the private key . You can generate these files

jakarta.persistence.Column

entailed by the primary key mapping and to constraints specified at the table level. Default: false ... Persistence (JPA) 1.0 boolean unique (Optional) Whether the column is a unique key . This is a shortcut for the UniqueConstraint annotation at the table level and is useful for when the unique key

jakarta.persistence.JoinColumn.name

of the referencing entity or embeddable class; " _ "; the name of the referenced primary key column ... of the entity; " _ "; the name of the referenced primary key column. Default: "" Since: Jakarta Persistence (JPA) 1.0 ... of the foreign key column. The table in which this column is found depends on the context

jakarta.persistence.EntityManager.find(Class,Object)

entityClass ,    Object primaryKey ) Find by primary key . Search for an entity of the specified class and primary key . If the entity instance is contained in the persistence context, it is returned from there. Parameters: entityClass - entity class primaryKey - primary key Returns

jakarta.persistence.EntityManager.find(EntityGraph,Object,FindOption...)

an instance of the root entity of the given EntityGraph by primary key , using the specified options ... and primary key . If the given options include a LockModeType , lock it with respect to the specified lock ... -specific options entityGraph - entity graph interpreted as a load graph primaryKey - primary key Returns

jakarta.persistence.EntityManager.find(Class,Object,Map)

entityClass ,    Object primaryKey ,    Map properties ) Find by primary key , using the specified properties. Search for an entity of the specified class and primary key ... class properties - standard and vendor-specific properties and hints primaryKey - primary key Returns

jakarta.persistence.EntityManager.find(Class,Object,LockModeType)

class and primary key , and lock it with respect to the specified lock type. If the entity instance ... class lockMode - lock mode primaryKey - primary key Returns: the found entity instance or null ... the second argument is not a valid type for that entity's primary key or is null

jakarta.persistence.EntityManager.find(Class,Object,LockModeType,Map)

properties ) Find by primary key and lock the entity, using the specified properties. Search for an entity of the specified class and primary key , and lock it with respect to the specified lock type ... - lock mode properties - standard and vendor-specific properties and hints primaryKey - primary key

jakarta.persistence.EntityManager.find(Class,Object,FindOption...)

of the given entity class by primary key , using the specified options . Search for an entity with the specified class and primary key . If the given options include a LockModeType , lock ... - standard and vendor-specific options entityClass - entity class primaryKey - primary key Returns

JPA Core Types

Initialize the persistence context and configure the engine using these classes: The primary bootstrap class ... ) and close it upon shutdown. The primary interface for performing CRUD operations, building queries

jakarta.persistence.Index

, is assumed. Note that it is not necessary to specify an index for a primary key , as the primary key has a unique constraint with an index created automatically. See Also: Table SecondaryTable

jakarta.persistence.Cache

class primaryKey - primary key Returns: boolean indicating whether the entity is in the cache ... for the given entity from the cache. Parameters: cls - entity class primaryKey - primary key

jakarta.persistence.SecondaryTables

secondary tables assuming primary key columns are named the same in all tables. @Entity @Table(name ... primary key columns. @Entity @Table(name = "EMPLOYEE") @SecondaryTables({ @SecondaryTable(name = "EMP

jakarta.persistence.MapKeyJoinColumn.table

entity relationship using a foreign key mapping strategy, the name of the primary table of the entity ... ) The name of the table that contains the foreign key column. If the join is for a map key for an element collection, the foreign key column is in the collection table for the map value. If the join

jakarta.persistence.EntityManager.getReference(Class,Object)

of the given entity class with the given primary key , whose state may be lazily fetched. If the requested ... while the entity manager was open. Parameters: entityClass - entity class primaryKey - primary key ... the second argument is not a valid type for that entity's primary key or is null. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.SecondaryTable.pkJoinColumns

Jakarta Persistence (JPA) Method in jakarta.persistence.SecondaryTable PrimaryKeyJoinColumn[] pkJoinColumns (Optional) The columns that are used to join with the primary table. Defaults to the column(s) of the same name(s) as the primary key column(s) in the primary table. Default: {} Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.MapKeyColumn.table

is for a OneToMany entity relationship using a foreign key mapping strategy, the name of the primary table ... ) The name of the table that contains the column. Defaults: If the map key is for an element collection, the name of the collection table for the map value. If the map key is for a OneToMany or ManyToMany

jakarta.persistence.JoinColumn.referencedColumnName

): The same name as the primary key column of the referenced table. Default: "" Since: Jakarta Persistence (JPA) 1.0 ... (Optional) The name of the column referenced by this foreign key column. When used with entity ... of the target entity. When used with a unidirectional OneToMany foreign key mapping, the referenced column

jakarta.persistence.JoinColumn.unique

) Whether the property is a unique key . This is a shortcut for the UniqueConstraint annotation at the table level and is useful for when the unique key constraint is only a single field. It is not necessary to explicitly specify this for a join column that corresponds to a primary key

jakarta.persistence.TableGenerator.pkColumnValue

Jakarta Persistence (JPA) Method in jakarta.persistence.TableGenerator String pkColumnValue (Optional) The primary key value in the generator table that distinguishes this set of generated values ... the primary key column of the generator table Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.TableGenerator.indexes

Jakarta Persistence (JPA) Method in jakarta.persistence.TableGenerator Index[] indexes (Optional) Indexes for the table. These are only used if table generation is in effect. Note that it is not necessary to specify an index for a primary key , as the primary key index is created automatically. Default: {} Since: Jakarta Persistence (JPA) 2.1

jakarta.persistence.Table.indexes

Jakarta Persistence (JPA) Method in jakarta.persistence.Table Index[] indexes (Optional) Indexes for the table. These are only used if table generation is in effect. Note that it is not necessary to specify an index for a primary key , as the primary key index is created automatically. Default: {} Since: Jakarta Persistence (JPA) 2.1

jakarta.persistence.GeneratedValue.strategy

Jakarta Persistence (JPA) Method in jakarta.persistence.GeneratedValue GenerationType strategy (Optional) The primary key generation strategy that the persistence provider must use to generate the annotated entity primary key . Default: AUTO Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.GenerationType.TABLE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.GenerationType TABLE Indicates that the persistence provider must assign primary keys for the entity using an underlying database table to ensure uniqueness. May be used to generate primary keys of type Long , Integer , long , or int . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.GenerationType.SEQUENCE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.GenerationType SEQUENCE Indicates that the persistence provider must assign primary keys for the entity using a database sequence. May be used to generate primary keys of type Long , Integer , long , or int . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.GenerationType.IDENTITY

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.GenerationType IDENTITY Indicates that the persistence provider must assign primary keys for the entity using a database identity column. May be used to generate primary keys of type Long , Integer , long , or int . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.GenerationType.UUID

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.GenerationType UUID Indicates that the persistence provider must assign primary keys for the entity by generating an RFC 4122 Universally Unique IDentifier. May be used to generate primary keys of type UUID or String . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.GenerationType.AUTO

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.GenerationType AUTO Indicates that the persistence provider should pick an appropriate strategy for the particular database. For a primary key of type UUID or String , this is equivalent to GenerationType.UUID . For a primary key

jakarta.persistence.SequenceGenerator.name

) A unique generator name that can be referenced by one or more classes to be the generator for primary key values. Defaults to the name of the entity when the annotation occurs on an entity class or primary key attribute. Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.CollectionTable.joinColumns

Jakarta Persistence (JPA) Method in jakarta.persistence.CollectionTable JoinColumn[] joinColumns (Optional) The foreign key columns of the collection table which reference the primary table ... of the referenced primary key column.) However, if there is more than one join column, a JoinColumn annotation

Database Replication and Clustering

. In a master-slave replication model, the master node manages the primary database, which supports

Which API should I use - JPA or JDO?

the primary API, and if necessary, switch to JDO as a secondary API for special additional features