ObjectDB Database Search

151-200 of 200 results

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

Find the error...JPA ENTITY HIBERNATE

; import javax.persistence. Id ; import javax.persistence.JoinColumn; import javax.persistence.JoinTable ... Serializable { private static final long serialVersionUID = 1L; // @GeneratedValue @ Id @Column(name = " id ") @GeneratedValue(strategy = GenerationType.IDENTITY) private int id ; @Column(name = "username") private

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 ;     

Error 363 - Failed to read value of inverse relationship

I've got two objects: @Entity public class EEvent { @ Id @GeneratedValue(strategy = GenerationType.AUTO) private long id ; @ManyToOne(optional=false) private ETown town; public ETown getTown ... { @ Id private String id ; @OneToMany(mappedBy="town") private Set events; public Set getEvents() { Set

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

Efficient query on EmbeddedId

understand that making a query just on entity. id .field1 is efficient. Of course, making a query ... is: what about making a query just on entity. id .field2? I suppose it will not be an efficient query, because all database entries have to be checked. My assumption is based on the fact that entity. 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}     

Object as parameter results in exception

; .     @ Id    private Long id ; } and the query:    @Override public T fetch(Company company, Long primaryKey) {   mLogger.info("Fetching type: {} with id ... p = c.from(managedClass);   c.select(p);   c.where(     qb.equal(p.get(" id

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

Entity (A) with additional data that use an existing ID of another Entity (B) from another class ... (B) we check if an Entity (A) with the ID of Entity (B) exist. If it exist we put the date ... the same transaction: first remove additional Data - The special Entity (with id 1) is empty and we remove

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

Eager Fetch is not stable for collection or map types?

getGame(long id ) {    EntityManager em = emf.createEntityManager();    try {     TypedQuery query = em.createQuery("select k from Game k where k. id =: id ", Game.class);     List result = query.setParameter(" id ", id ).getResultList();    

Unable to persist fields in subclass

final void setAddressID(long id ) { if ( id 0) addressID = id ; } public final long getContactID() { return contactID; } public final void setContactID(long id ) { if ( id 0) contactID = id ; } } package ... .persistence. Id ; import javafx.beans.property.ObjectProperty; import javafx.beans.property

Left join fetch behaviour doesn't retrieve children?

.EntityManagerFactory; import javax.persistence. Id ; import javax.persistence.ManyToMany; import javax ... ; @ Id         private String name;       ... ;  public static class MyEntityChild {         @ Id   

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) {  

Extra uninitialised entities spawned on merge()

().commit();         Long id = root.getId();         root = em.find(Element.class, id ); //now detached, since outside transaction   ... ;   return "{" + getClass().getSimpleName() + "}[" + id + "](" + name + ")";    

Relationships and tracking changes

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") public class EBUser extends Pojo

Problem to use find method on an abstract Class: AbstractMethodError is thrown

-127.0.0.1-8080-1) JBAS014101: Failed to find SFSB instance with session ID {[-48, -118, 126, 59, 2 ... after him.   When I use:   em.find(Guest.class, id )  everything works just fine but when I use: em.find(AbstractGuest.class, id ) I get Null. no Exception or Error is thrown though   

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

@Unique member combination not working

= {"name", "surname"}) public class Person implements Serializable {     @ Id     @GeneratedValue     private Integer id ;     private String ... ;   return id ;     }     public void setId(Integer id

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

New entity objects are duplicated on merge cascading

; @Entity     public static class Book {         @ Id ... ;      private Long id ;           ... ; @ Id         @GeneratedValue(strategy = GenerationType.AUTO

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 ... ;  final int Id = 0;         em.getTransaction().begin();  

[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