ObjectDB Database Search

101-150 of 200 results

Add license back

according to chat on ticket https://www.objectdb.com/ticket/2983 can you add my licenses back please ? kadirbasol Kadir BASOL The licence will become linked after the first activation. support Support

Getting Foreign Key

How to get Foreign key using  org.eclipse.persistence.queries.WriteObjectQuery class ... can get line level primary key but i also nead to get foreign key which is belongs to header ... this i got pojo name query.getPrimaryKey() by using this i can get primary key now i nead

A bidirectional OneToOne association with a shared primary key

;bidirectional @OneToOne association that has a shared primary key , example: http://fruzenshtein.com/bidirectional-one-to-one-primary- key -association/ Can ObjectDB support this same specific relationship ... keys , i.e. the primary key will be stored at least on one side of the relationship

problem when primary key value is zero

and recommendations, in particular there are some primary keys with value == 0. These cause problems for objectDB, typically "JPA Unexpected argument as primary key ". When using eclipselink, there is a workaround ... Lister There is nothing wrong with 0 as a primary key value. For example the following code doesn't

Unexpected query token 'KEY'

.customProperties cp WHERE KEY (cp) = :propertyName AND VALUE(cp) = :propertyValue ORDER BY td.createdTimeMillis I get the "Unexpected query token ' KEY '" error. Is there another way to do this and I am just using ... with a collection of embedded objects. This will also enable defining indexes on the keys /values

Index on map key

Is there a way to create an Index with @Index on the key of a map? wua Andreas Wurm Indexes on map keys as well as queries on map keys are currently not supported. But as a workaround you can use a collection of embedded objects, as demonstrated below: package test; import java.util.*; import

Failed to commit transaction: Attempt to reuse an existing primary key value (613)

.RollbackException Failed to commit transaction: Attempt to reuse an existing primary key value ... .EntityExistsException: com.objectdb.o.UserException: Attempt to reuse an existing primary key value ... with the same primary key . Unfortunately it is impossible to provide help based on this report

Foreign key constraint issue

Hi, I'm trying to create two tables (Parent and Child) with a foreign key constraint from Child ... one specific case that foreign key constraint doesn't apply and I can't figure how to make it work ... want to remove all orphaned child entities (as with a foreign key constraint). Interestingly

Intermittent: "Attempt to reuse an existing primary key value" when persisting a new instance

Hi,   I don't have a useful test case to expose this issue, but I am getting an intermittent "Attempt to reuse an existing primary key value". In this particular instance, the error is: Attempt to reuse an existing primary key value (com.x.y.z.UserPassword:1) (error 642) at com.objectdb.jpa

Error opening database with ObjectDB Explorer when using composite key

Hi, When I use a composite key in an entity and fill this database with this entity, ObjectDB explorer throws me an error when opening this database saying something about an invalid ID class ... has been attached to this ticket. The code itself looks like this:   KEY : public class PersonId

Merge failure with composite primary key

.3.7_21 should fix it. The composite primary key issue is unclear, since switching to a single primary key field doesn't seem to make any difference. support Support

ObjectDB JDO - foreign key constraints

Hi, I am new to both JDO and ObjectDB, and am struggeling to figure out how to define foreign key relationships. For instance, I have create two classes: @Entity public class Person implements ... ; Any help appreciated! ralfne Ralf Stefan Neumann ObjectDB doesn't enforce foreign key constraints

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

retrieve without key?

. i'm loading data from an external source. i use keys from that source. since i have a singleton i ... and can't see an option to retrieve an object w/o using a key . can this be done? duetto john cummings You can use a single result query . support Support

KEY() / VALUE() not recognized in JPQL??

Hi! Explorer says "unexpected token" on KEY (..: SELECT FROM individual.IndividualContact $1 LEFT OUTER JOIN $1.profile.title.name m WHERE ( KEY (m) = 'deu' AND VALUE(m) LIKE '%Dr%') profile = embedded entity title = referenced entity name = Map   thanks, Alex quasado Alexander Adam Yes

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 ... key of the removed object. Obviously a possible workaround is to update the object instead

Can a Set be a foreign key?

I have two classes, Cell and Character.  Basically, the cell is like a room, and contains a variable (private Set cellHeldCharacters;) which holds the IDs of the characters within the cell (The IDs are Primary Keys ).  Can I use the Foreign Key annotation for the variable, or

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

selecting objects that have a particular key/value in persistant HashMap

that the pMap field of some Person objects has the key /value pair "location'/'California'.  Can I

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

Cross-platform license: Ubuntu and Windows 8

Cross-platform license: Ubuntu and Windows 8

Clarification on free license restrictions

Clarification on free license restrictions

Internal ObjectDB error by read the primary key

Internal ObjectDB error by read the primary key

Eager Fetch of Map with Entities as Keys

Loading eagerly a map that uses entity objects as keys is currently unsupported, if the equals and hashCode methods of the keys are based on the key entity persistent content, since that content ... ;   MyKeyEntity key = new MyKeyEntity(" key ");         em

Query on primary key is slow when using 'IN'

Hi! We have an entity with a composite primary key on "primaryVariantOid" and "storeOid" fields ... entityManager.find to look up every entity by the primary key . This ended up being even faster ... was also trying to find if there was any API like entityManager.find, but for bulk retrieval by primary keys

JPA Composite Key make Object Db throws "Unexpected exception (Error 990)"

Hello Object Db community :) I am using this wonderful library and I caught a strange exception while testing the "composite key " feature in JPA. Let's see what I am doing : @Entity public class ... be reproduced with a simple ( not embedded Id ) key with an enum type. Here is the code : package test

Page #9 entry 0 (key 'bjjl') has 75 extra bytes / Unexpected last index ID: -119 (expected -116)

------------------- [1] Page #9 entry 0 has unexpected object format [2] Page #9 entry 0 ( key 'bjjl') has 75 ... ] Page #3 entry 0 has unexpected object format [2] Page #3 entry 0 ( key 'guest') has 11 extra bytes

jakarta.persistence.JoinColumns

: Annotation Target: Method, Field Specifies the mapping for composite foreign keys . This annotation ... of a foreign key constraint when table generation is in effect. If both this element and the foreignKey element of any of the JoinColumn elements are specified, the behavior is undefined. If no foreign key

jakarta.persistence.NamedAttributeNode

) If the attribute references a Map type, this element can be used to specify a subgraph for the Key in the case of an Entity key type. A keySubgraph can not be specified without the Map attribute ... subclass subgraphs. The value of this element is the name of the key subgraph as specified by

jakarta.persistence.EntityManagerFactory

. Since: Jakarta Persistence (JPA) 3.2 Map getNamedEntityGraphs ( Class entityType ) A map keyed by graph ... : a map keyed by graph name. Since: Jakarta Persistence (JPA) 3.2 Map getNamedQueries ( Class resultType ) A map keyed by query name , containing references to every named query whose result type

jakarta.persistence.criteria.MapJoin

: - the source type of the join - the type of the target Map value - the type of the target Map key Super ... Persistence (JPA) 1.0 Path key () Create a path expression that corresponds to the map key . Returns: path corresponding to map key . Since: Jakarta Persistence (JPA) 1.0 Predicate notEqualTo ( Expression

jakarta.persistence.AttributeOverride

collection whose key and/or value is an embeddable class. When AttributeOverride is applied to a map, " key . " or " value. " must be used to prefix the name of the attribute that is being overridden in order to specify it as part of the map key or map value. To override mappings at multiple levels

jakarta.persistence.PrimaryKeyJoinColumns

to map composite foreign keys . Example: ValuedCustomer subclass @Entity @Table(name = "VCUST ... the generation of a foreign key constraint when table generation is in effect. If both this element ... . If no foreign key annotation element is specified in either location, a default foreign key strategy

jakarta.persistence.PrePersist

class. A generated primary key value is available when this callback occurs only for UUID , TABLE , or SEQUENCE primary key generation. For IDENTITY primary key generation, the generated primary key

DISTINCT key causing internal exception on 2.6.4.b10

I observed that on new ObjectDb v.2.6.4.b10 query below causes internal exception SELECT DISTINCT $1 FROM Pa3DictionaryItem $2 JOIN $2.values $1 WHERE ($2.namespace == 'com.anritsu.pa3.ttcn3' AND $2. key == 'TliEvent' AND $1 != '') Query above also worked fine on ObjectDb version 2.6.1.b06 Harman

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.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.MapKeyClass

: Annotation Target: Method, Field Specifies the type of the map key for associations of type Map . The map key can be a basic type, an embeddable class, or an entity. If the map is specified using Java ... Persistence (JPA) 2.0 Annotation Elements Class value (Required) The type of the map key . Since: Jakarta

jakarta.persistence.Column

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 ... entailed by the primary key mapping and to constraints specified at the table level. Default: false

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

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.PessimisticLockScope

table(s). Entity relationships for which the locked entity contains the foreign key ... ). Element collections and relationships for which the entity does not contain the foreign key (such as ... for which the target entity contains the foreign key ) will not be locked by default. Since: Jakarta Persistence

jakarta.persistence.NamedAttributeNode.keySubgraph

for the Key in the case of an Entity key type. A keySubgraph can not be specified without the Map ... entries are merged into subclass subgraphs. The value of this element is the name of the key subgraph as specified by the name element of the corresponding NamedSubgraph element. If multiple key subgraphs

jakarta.persistence.MapKeyColumn.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 entity relationship using a join table, the name of the join table for the map. If the map key

jakarta.persistence.JoinColumn.referencedColumnName

(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 is in the table of the source entity. When used inside a JoinTable annotation, the referenced key 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.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