ObjectDB Database Search
101-150 of 200 resultsPersist error @ManyToMany how to define correct entities relationships Category but they are all refering to same limited set of Category entities (via ID ). There is not changes made to Category from Product. The category ID is taken from the webservice Object ID (unique too). @Entity public class Product implements Serializable { @ Id @GeneratedValue private long id | |
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 | |
@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 | |
jakarta.persistence.MapKey() {... } ... } @Entity public class Employee { ... @ Id Integer getEmpId() { ... } @ManyToOne @JoinColumn(name = "dept_ id ") public Department getDepartment() { ... } ... } Example 2: @Entity public class Department ... () {... } ... } @Entity public class Employee { @ Id public Integer getEmpId() { ... } ... @ManyToOne | |
jakarta.persistence.MappedSuperclass. Example: Concrete class as a mapped superclass @MappedSuperclass public class Employee { @ Id ... ") protected Address address; public Integer getEmpId() { ... } public void setEmpId(Integer id ... = "ADDR_ ID ")) public class PartTimeEmployee extends Employee { // Inherited empId field mapped to PT | |
jakarta.persistence.ConstructorResult is retrieved for the constructed object. Example: Query q = em.createNativeQuery( "SELECT c. id , c.name ... " + "WHERE o.cid = c. id " + "GROUP BY c. id , c.name", "CustomerDetailsResult"); @SqlResultSetMapping( name ... , columns = { @ColumnResult(name = " id "), @ColumnResult(name = "name"), @ColumnResult(name | |
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 | |
jakarta.persistence.MapsId { @ Id long empId; String name; ... } And then the dependent entity uses EmbeddedId to declare ... to primary key type of Employee } @Entity public class Dependent { @EmbeddedId DependentId id ; ... @MapsId("empid") // maps the empid attribute of embedded id @ManyToOne Employee emp; } If a ManyToOne | |
jakarta.persistence.EmbeddedId of the entity may be annotated Id or EmbeddedId , and the entity class must not declare an IdClass ... those attributes of the embedded id that do not correspond to the relationship to the parent entity ... (name = "dep_name")) @EmbeddedId DependentId id ; ... @MapsId("empPK") @ManyToOne Employee emp | |
jakarta.persistence.EntityResult. Example: Query q = em.createNativeQuery( "SELECT o. id , o.quantity, o.item, " + "i. id , i.name, i.description " + "FROM Order o, Item i " + "WHERE (o.quantity 25) AND (o.item = i. id )", "OrderItemResults | |
jakarta.persistence.OneToMany_ ID ", nullable = false) public Customer getCustomer() { return customer; } Example 2: One-to-Many ... : @ManyToOne @JoinColumn(name = "CUST_ ID ", nullable = false) public Customer getCustomer() { return ... Customer class: @OneToMany(orphanRemoval = true) @JoinColumn(name = "CUST_ ID ") // join column is in | |
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 | |
jakarta.persistence.metamodel.SingularAttribute.isId() Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.SingularAttribute boolean isId() Is the attribute an id attribute? This method returns true if the attribute is a simple id , an embedded id , or an attribute of an id class . Returns: boolean indicating whether the attribute is an id . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.metamodel.IdentifiableType.getId(Class) SingularAttribute getId ( Class type ) Return the attribute that corresponds to the id attribute of the entity or mapped superclass. Parameters: type - the type of the represented id attribute Returns: id attribute. Throws: IllegalArgumentException - if id attribute of the given type is not present in | |
jakarta.persistence.metamodel.IdentifiableType.getDeclaredId(Class) SingularAttribute getDeclaredId ( Class type ) Return the attribute that corresponds to the id ... declared id attribute Returns: declared id attribute. Throws: IllegalArgumentException - if id attribute of the given type is not declared in the identifiable type or if the identifiable type has an id class. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.metamodel.IdentifiableType.hasSingleIdAttribute() hasSingleIdAttribute() Whether the identifiable type has a single id attribute. Returns true for a simple id or embedded id ; returns false for an idclass. Returns: boolean indicating whether the identifiable type has a single id attribute. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.PersistenceUnitUtil.getIdentifier(Object) Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceUnitUtil Object getIdentifier ( Object entity ) Return the id of the entity. A generated id is not guaranteed ... yet have an id . Parameters: entity - entity instance Returns: id of the entity. Throws | |
jakarta.persistence.JoinColumns = "ADDR_ ID ", referencedColumnName = " ID "), @JoinColumn(name = "ADDR_ZIP", referencedColumnName = "ZIP | |
jakarta.persistence.JoinColumn and the default values apply. Example: @ManyToOne @JoinColumn(name = "ADDR_ ID ") public Address getAddress ... Customer class @OneToMany @JoinColumn(name = "CUST_ ID ") // join column is in the table for Order | |
jakarta.persistence.MapKeyColumn public class Item { @ Id int id ; ... @ElementCollection @MapKeyColumn(name = "IMAGE_NAME") @Column(name | |
jakarta.persistence.Embeddable annotated Id or EmbeddedId . Fields or properties of an embeddable class are persistent by default ... PhoneServiceProvider { @ Id protected String name; ... } Example 3: @Embeddable public class Address { protected | |
jakarta.persistence.Transient: @Entity public class Employee { @ Id int id ; @Transient User currentUser; ... } Since: Jakarta | |
jakarta.persistence.PrimaryKeyJoinColumns") @DiscriminatorValue("VCUST") @PrimaryKeyJoinColumns({ @PrimaryKeyJoinColumn(name = "CUST_ ID ", referencedColumnName = " ID "), @PrimaryKeyJoinColumn(name = "CUST_TYPE", referencedColumnName = "TYPE | |
jakarta.persistence.SecondaryTables_DETAIL", pkJoinColumns = @PrimaryKeyJoinColumn(name = "EMPL_ ID ")), @SecondaryTable(name = "EMP_HIST", pkJoinColumns = @PrimaryKeyJoinColumn(name = "EMPLOYEE_ ID "))}) public class Employee | |
jakarta.persistence.SecondaryTable(name = "CUST_DETAIL", pkJoinColumns = @PrimaryKeyJoinColumn(name = "CUST_ ID ")) public class Customer ... = "CUST_ ID "), @PrimaryKeyJoinColumn(name = "CUST_TYPE")}) public class Customer { ... } This annotation | |
jakarta.persistence.metamodel.IdentifiableType.getIdClassAttributes() Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType Set getIdClassAttributes() Return the attributes corresponding to the id class of the identifiable type. Returns: id attributes. Throws: IllegalArgumentException - if the identifiable type does not have an id class. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.metamodel.IdentifiableType.getIdType() Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType Type getIdType() Return the type that represents the type of the id . Returns: type of id . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.PersistenceUnitUtil.getVersion(Object) yet have an id . Parameters: entity - entity instance Returns: id of the entity. Throws | |
jakarta.persistence.Converter never applies to id attributes , version attributes , relationship attributes, or to attributes explicitly | |
jakarta.persistence.Entity class must have at least one field or property annotated Id or EmbeddedId holding the primary key | |
jakarta.persistence.ElementCollection Person { @ Id protected String ssn; protected String name; ... @ElementCollection protected Set | |
jakarta.persistence.UniqueConstraint = @UniqueConstraint(columnNames = {"EMP_ ID ", "EMP_NAME"}) ) public class Employee { ... } Since: Jakarta | |
jakarta.persistence.CollectionTable class Person { @ Id protected String ssn; protected String name; protected Address home | |
jakarta.persistence.PrimaryKeyJoinColumn @Table(name = "VCUST") @DiscriminatorValue("VCUST") @PrimaryKeyJoinColumn(name = "CUST_ ID ") public | |
jakarta.persistence.Temporal of these types. The Temporal annotation may be used in conjunction with the Basic annotation, the Id | |
jakarta.persistence.OrderColumn column value for the first element is 0 . Example: @Entity public class CreditCard { @ Id long | |
jakarta.persistence.TableGenerator.allocationSize Jakarta Persistence (JPA) Method in jakarta.persistence.TableGenerator int allocationSize() (Optional) The amount to increment by when allocating id numbers from the generator. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.TableGenerator.table Jakarta Persistence (JPA) Method in jakarta.persistence.TableGenerator String table() (Optional) Name of the table that stores the generated id values. Defaults to a name chosen by persistence provider. Since: Jakarta Persistence (JPA) 1.0 | |
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 attribute. Since: Jakarta Persistence (JPA) 1.0 | |
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.strategy member. Since: Jakarta Persistence (JPA) 1.0 | |
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 |