ObjectDB Database Search

101-150 of 200 results

General Performance Issues Illustrated with a Specific Method

listPatientsByIDsWithBasicData(String ids ) { Long st = new Date().getTime(); System.out.println("listPatientsByIDsWithBasicData - start - " + st); List cs = new ArrayList (); if ( ids == null || ids .trim ... .health.phsp.pojcs.ClientBasicData(" + "c. id , " + "c.phn, " + "c.person.name, " + "c.person.nic, " + "c

Optimistic locking: prevent version increment on entity collection attribute

class Document {        // ID is generated by the database     @ Id private long id ;        @OneToMany(mappedBy="document")    ... getId() {         return id ;     }   

Database Inconsistency or corruption

. ObjectValue ID :=100, TYPE:=Person, REVISION:=0, isPersisted:=true, LockMode:=PESSIMISTIC_WRITE]] ... Attribute  ID :=1400, Name:=profileName, Value:= ID :=1400, PrimitiveValue:=ProfileName 99, REVISION:=0 ... . ObjectValue ID :=100, TYPE:=Person, REVISION:=2, isPersisted:=true, LockMode:=PESSIMISTIC_WRITE

Need help to make this test work and define proper annotations for entities Lists

javax.persistence. Id ; import javax.persistence.Persistence; import javax.persistence.TypedQuery ... ;          @ Id @GeneratedValue private long id ;   ... ;             return id ;    

Problem with distinct select, order by and equivalent alias/attribute path

implements Serializable {     @ Id     private String id ;     ... ; }     public Location(String id , String town) {         this. id = id ;         this.town = town;    

ClassCastException on SELECT NEW ... after UPDATE over Java RMI

internally runs SELECT NEW ... queries. For example: SELECT NEW com.arunta.base.db.FileNameDTO(r. id ... 'NEW com.arunta.base.db.FileNameDTO(r. id , r.fileName)' (error 783) at java.awt.AWTEventMulticaster ... .objectdb.o.UserException: Failed to build result of type 'NEW com.arunta.base.db.FileNameDTO(r. id , r

Strange behaviour with ORDER BY and IN

if we order by a simple member (e.g. a String) being the Entity- ID and, at the same time, filter ... the Entity- ID ) actually work well, this behaviour is only observable when filtering and ordering both are done on the ID member.   Assuming this simple Entity class: @Entity public class Location

2.7.3_03 Erroneous "Attempt to modify a primary key of a managed object"

. Could you please provide details on the primary key of JdoBlob2 ? Is it composite? embedded ID ? Is there an ID class attached? Relevant fields and annotations from class JdoBlob2 could help. support ... (maybe the Java 9.0 modules). Your id type is  StringIdentity . Note that StringIdentity is defined

Broken @ManyToOne reference

public abstract class A { @ Id @ManyToOne(fetch = FetchType.EAGER, cascade=CascadeType.ALL, optional=false) private B b; @ Id @Column(length = 36) private String stringId; } @MappedSuperclass public abstract class B { @ Id private String name; } Both objects store with no error

NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1

IAbstractObject { //private static final long serialVersionUID = 1L; @ Id private String id = UUID.randomUUID().toString(); public String getId() { return id ; } public void setId(String id ) { this. id = id ; } @Override public int hashCode() { int hash = 0; hash += ( id != null ? id .hashCode() : 0); return

c.o.jpa.type.EntityTypeImpl.getIdType() returns null

the debugger is i can see this member m_idType is null type EntityTypeImpl   ( id =57) m_attrMap LinkedHashMap   ( id =74) m_declAttrMap LinkedHashMap   ( id =78) m_entityName "Foo" ( id =80) m_errorManager JPE  ( id =83) m_idClassAttr Collections$EmptySet  ( id =87) m_idSingleAttr

Composite Index error 328

= -1"), } ) @Indices( { @javax.jdo.annotations.Index(members = {" id ","pwd","access"}) } ) public ... = -4472890635861972890L; private int id ; private int dyId; private long pwd; private String usrName; private ... kadrosu; private String buroGruplama; private Long groupsHash; @ Id @Column(name = " id ") public int

openejb jpa jaas module

.getPrincipals(); final int id = info.getId(); final TypedQuery namedQuery = entityManager.createNamedQuery ... ; @GeneratedValue(strategy = GenerationType.SEQUENCE , generator = "gen") @ Id private int principalId; public ... = "UserInfo.getByClientId" , query = "select ui from UserInfo ui where ui. id = : id "), @NamedQuery(name

Embedded Entity in EmbeddedId not persisted. Error 631 at select.

javax.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence. Id ... ;@EmbeddedId         private AId id ;          ... id ) {             this. id = id ;     

Update Entity references if we change the type of an entity

how we detect the existing EntityB instances they must be converted to the new Entity. With the same ID , because it's possible that many other entities have just a ID based reference with a simple 'int' field to this element. And we thought that also the real references are based on the ID . This step

TemporalType injection with Calendar using JPA

Serializable { private TimePeriod id ; private List points; public Chart() { this.points = new ArrayList (); }   @EmbeddedId public TimePeriod getId() { return id ; }   public void setId(TimePeriod id ) { this. id = id ; }   @OneToMany(cascade=javax.persistence.CascadeType.ALL,fetch=javax

Is it possible to remove parent/child entities without refresh?

.persistence. Id ; import javax.persistence.ManyToOne; import javax.persistence.MapKey; import javax ... { @Entity public static class ParentEntity {   @ Id   @GeneratedValue   private long id ... (), child);   }   public long getId() {    return id ;   }   public void

Merge with Parent/Child entities not possible

.GeneratedValue; import javax.persistence. Id ; import javax.persistence.ManyToOne; import javax ... {   @ Id   @GeneratedValue   private long id ;   @OneToMany(fetch = FetchType.LAZY ... () {    return id ;   }   public void setId(long id ) {    this. id = id

failure to enforce NOT NULL for java.lang.String

: @Entity public class Request { public Request() { } @ Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id ; @Unique @Persistent(nullValue=NullValue.EXCEPTION) private String username; public Long getId() { return id ; } public void setId(Long id ) { this. id = id ; } public String

Query in JPA2 with LEFT JOIN on INNER JOIN

How write a query in JPA2 with LEFT JOIN on INNER JOIN? select a.description, a. id , p1.description, p2.description,p3.description from action a left join action_profile ap1 on ap1. id _action=a. id inner join profile p1 on ap1. id _profile=p1. id and p1.name='?' left join action_profile ap2 on ap2. id

persisting object with long[][] arrays of array

.persistence.Entity; import javax.persistence.FetchType; import javax.persistence. Id ; import javax ... ; private static final long serialVersionUID = 1L;     public @ Id String id ;    ... ;     public TESTObject(String ids , long[] time, long[][] a1, long[][] a2, long[][] b1

Does ObjectDB support lazy loading?

. However, when the Parent object is read from EntityManager, all the properties except ID of the Child objects are null ... .persist(a); em.getTransaction().commit(); Long id = a. id ; em.close(); em = emf.createEntityManager(); a = em.find(A.class, id ); System.out.println(a.list); em.close(); emf.close(); } @Entity static class

Date field Index is corrupted due to time change

.GenerationType; import javax.persistence. Id ; import javax.persistence.Persistence; import javax.persistence ... {         private Long id ;        ... ;   }             if ( id == null

Database size is much larger than expected (x2)

[] ::=@ ID So simple a class will fail after 155,648 insertions with -Xmx1432m, ... NO = 151552 @ 8042217472 id = 0 @ 7703244276 Url = http://cimg2.163.com/catchpic/E/E9/E96492634557CE291CDF3AADC710F373.jpg NO = 155648 @ 8042217472 id = 0 @ 8016831165 Url = http://pic.tiexue.net/pics/2005_10_19_99028

EmbeddedId with Generated field value

********* @Entity @IdClass(CompositePK.class) public class A {     @ Id private long uid;     @ Id private String zone; } public class CompositePK {      ... annotation @GeneratedValue like the following: Solution 1) class A { @ Id @GeneratedValue private long uid

Wrong data stored in time only fields

; import javax.persistence.GenerationType; import javax.persistence. Id ; import javax.persistence ... ;       private Long id ;         ... ;    if ( id == null) {            

Trouble bug on explorer

") }) @SequenceGenerator(name="seq", initialValue=10000) @Entity public class User implements Serializable { @ Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq") private int gid; @Index private int id ... setGid(int gid) { this.gid = gid; } public final int getId() { return id ; } public final void setId

Entity with java.util.Date column gives ClassCastException in BIRT

class Patient {     @ Id     @GeneratedValue(strategy=GenerationType.IDENTITY)     private long id ;     private String name;    ... ;  /**      * Returns the id of this {@link Patient}     

How do I achieve a Deep Fetch using JOIN FETCH?

class B { List aList; }; @Entity class C { @ Id long id ; List bList; };   Usually I'm content ... of eager fetch in JPQL as follows: SELECT c FROM C JOIN FETCH c.bList WHERE c. id =: id But when I attempt to take it to the 2nd level: SELECT c FROM C JOIN FETCH c.bList JOIN FETCH c.bList.aList WHERE c. id

EntityManager JPA or JDO impl and different behavior

" then everything comes back correctly. However if I use em.find(SomeObject.class, id ) the map is NOT populated. I ... . That still doesn't change the fact that in my project the em.find(type, id ) doesn't populate ... ;       long id = 1;         List

Beginners questions

implements Serializable { private static final long serialVersionUID = 1L; @ Id @Column(name = " ID ") @GeneratedValue(strategy = GenerationType.AUTO) private Long id ; @OneToMany (fetch=FetchType.LAZY,cascade=CascadeType.ALL, mappedBy="VERLAG_ ID ") private List users; Table "EBUser": @Entity(name="USER

Exception when querying Map property with @embedded & Enhancer enabled

the error 'Failed to write the value of field field TestEmbeddableMap$MyAttributeItem. id using enhanced ... static class MyAttributeItem {   private String id ;   private String name;   private String value;     public MyAttributeItem(String id , String name, String value) {  

joining of tables

2: address  and the generate table will be table 3: emp_add employee: e_ id , e_name address: add_ id , city, house_no; the third table will be like. emp_add: e_ id , add_ id i am using annotation like ... = "e_ id ", referencedColumnName = "e_ id "), inverseJoinColumns = @JoinColumn(name = "add_ id

LEFT JOIN FETCH over empty embedded collection returns no results

class C { @ Id long id ; List bList; }; If I have an instance of C where bList is empty, the following works (returns my instance of C): SELECT c FROM C c LEFT JOIN FETCH c.bList WHERE id =: id ; But if I ... FETCH c.bList LEFT JOIN FETCH c.bList.val WHERE id =: id ; The semantics implied by LEFT JOIN suggest

Problem with byte arrays in JDO - internal exception

; /** * * @author steve */ public class Example { private long id ; private String name; private byte[] data; /** * @return the id */ public long getId() { return id ; } /** * @param id the id to set */ public void setId(long id ) { this. id = id ; } /** * @return the name */ public String getName() { return

Join query problem with new statetment

;  "select new InspirationsPerSupplierResult(insp. id , insp.name, p. id , p.name) from ... = GenerationType.AUTO)     @ Id     private long id ;   ... ;@ Id     private long id ;     @Column(nullable = false)  

List of Enum Values in an entity

; import javax.persistence.GeneratedValue; import javax.persistence. Id ; import org.eummcr.datastore ... implements Serializable { private static final long  serialVersionUID = 1L; @ Id @GeneratedValue Long       id ; private String     name; private

Storing objects problem

ipAddress;     private Device parent;     @ Id     private String ID ;     private String ID _HZMO;     ... ; private DeviceT parent;   @ Id   private String ID ;   private List children;   private

Problem with byte arrays in JDO - ClassCastException

; } } package spiffy.test.model; /** * * @author steve */ public class Example { private long id ; private String name; private byte[] data; /** * @return the id */ public long getId() { return id ; } /** * @param id the id to set */ public void setId(long id ) { this. id = id ; } /** * @return the name

Join performance in Objectdb

SELECT count(e) FROM Meta e, ImageNet i, Page p WHERE e.idImage=i. id AND e.idPage=p. id ; So simple ... IDs instead of references, which is not recommended when using JPA. It seems that a Meta instance holds the IDS of an Image and a Page instances instead of direct references. A more JPA conventional

jakarta.persistence.TableGenerator.name

Jakarta Persistence (JPA) Method in jakarta.persistence.TableGenerator String name (optional) A unique generator name that can be referenced by one or more classes to be the generator for id values. Defaults to the name of the entity when the annotation occurs on an entity class or primary key

jakarta.persistence.IdClass.value

Jakarta Persistence (JPA) Method in jakarta.persistence.IdClass Class value The primary key class, which must declare fields or properties with names and types that match the Id fields and properties of the annotated entity class. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.GeneratedValue.generator

provider supplies a default id generator, of a type compatible with the value of the GeneratedValue

Inverse OneToMany Mapping and EmbeddedId

.persistence . Id ; import javax.persistence . ManyToOne ; import javax.persistence . OneToMany ... = " id .ab") into @EmbeddedId fails!  *   *         question ... A {          @ Id          @GeneratedValue

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

extends AbstractEntity implements IAbstractEntity { @ Id @Column(name = "account_ id ") @GeneratedValue(strategy= GenerationType.TABLE) protected Long id ; @Override public Long getId() { return id ; } @Override public void setId(Long id ) { this. id = id ; } @OneToMany(cascade={CascadeType.MERGE

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

= "Element_owns_Element", joinColumns = @JoinColumn(name = "owner_ ID ", referencedColumnName = " ID "), inverseJoinColumns = @JoinColumn(name = "ownedElement_ ID ", referencedColumnName = " ID ")) public Element ... ,"---"); } INFO: ConfigBean []: testQuery: element([class=TestDeepValues][project=TEST: project 1][ id =45

Tracking changes to new collections (in enhancement mode) after flush

MappingImpl implements Mapping { //the UID of the Mapping @ Id @Access (AccessType.FIELD) @Column (name ... ;       em.flush();         long id = entity. id ... ;            entity = em.find(ListInMap.class, id );  

Blocked by find

I have a container object which wraps an objectdb database. There is a "putIfAbsent(String id , Object obj)" method which is synchronized and attempts to load an object by id using the EntityManager ... { @ Id private String id ; @Index private String containerId; private String data; public DataHolder

[ObjectDB 2.2.6_02] Unexpected exception (Error 990) at com.objectdb.o.OBC.aJ(OBC.java:961)

findMomentEntity(Long id ) { EntityManager em = getEntityManager(); try { return em.find(MomentEntity.class, id ... .getLocalizedMessage(); if (msg == null || msg.length() == 0) { TimePeriod id = chart.getId(); if (findChart( id ) == null) { throw new EntityNotFoundException("The ChartEntity with id " + id + " no longer exists

I can't get cascading delete to work in JDO

; public static class Holder {         private String id ;       ... ;     public Holder(String id , Dependent... dependents) {             this. id = id ;             this.dependents = Arrays.asList