ObjectDB Database Search
101-150 of 200 results@OneToMany(fetch = FetchType.LAZY) list is always null = "b", allocationSize = 1) public class Parent { @ Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "b") private int id ; @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) private List children; public int getId() { return id ; } public void setId(int id ) { this. id = id | |
Should derived fields of an EmbeddedId be manually maintained by app code? setSingleton(EContainer singleton) { this. id .cont = singleton. id ; this.container = singleton; } But if I ... (ECompoundKeyMapItem parent) { this. id .prnt = parent. id ; this.parent = parent; } [ObjectDB 2.3.0_01 ... .persistence.FlushModeType; import javax.persistence. Id ; import javax.persistence.NamedQueries; import | |
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 | |
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 | |
Inverse OneToMany Mapping and EmbeddedId.persistence . Id ; import javax.persistence . ManyToOne ; import javax.persistence . OneToMany ... = " id .ab") into @EmbeddedId fails! * * question ... A { @ Id @GeneratedValue | |
AnnotationAttrRef jakarta.persistence.TableGenerator.name JPA Annotation Attribute in jakarta.persistence.TableGenerator String name default "" (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 attribute. Since: JPA 1.0 | |
AnnotationAttrRef jakarta.persistence.TableGenerator.table JPA Annotation Attribute in jakarta.persistence.TableGenerator String table default "" (Optional) Name of the table that stores the generated id values. Defaults to a name chosen by persistence provider. Since: JPA 1.0 | |
AnnotationAttrRef jakarta.persistence.TableGenerator.allocationSize JPA Annotation Attribute in jakarta.persistence.TableGenerator int allocationSize default 50 (Optional) The amount to increment by when allocating id numbers from the generator. Since: JPA 1.0 | |
AnnotationRef jakarta.persistence.Temporal may be used in conjunction with the Basic annotation, the Id annotation, or the ElementCollection annotation | |
AnnotationRef jakarta.persistence.Convert conversion of id attributes, of version attributes, of relationship attributes, or of attributes | |
AnnotationAttrRef jakarta.persistence.IdClass.value JPA Annotation Attribute in jakarta.persistence.IdClass Class value default null 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: JPA 1.0 | |
AnnotationRef jakarta.persistence.Embeddable. However, an embeddable class may not have a field or property annotated Id or EmbeddedId . Fields or properties | |
AnnotationAttrRef jakarta.persistence.GeneratedValue.generator provider supplies a default id generator, of a type compatible with the value of the strategy member. Since: JPA 1.0 | |
AnnotationRef jakarta.persistence.Entity must have at least one field or property annotated Id or EmbeddedId holding the primary key of the entity. An entity class | |
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 |