ObjectDB Database Search
1-50 of 91 resultsLAZY @ManyToOne field functions as EAGER to console a lazy @ ManyToOne field after the entity manager closes. There is a switch DO_VIEW ... closes and as expected both a LAZY @ ManyToOne field and an EAGER @ ManyToOne field are viewable: b ... , when it is marked as @ ManyToOne (fetch=FetchType.LAZY) ? package com.greensoft.objectdb.test | |
Conflicting modifiers .... (javax.persistence.Id, javax.persistence.ManyToOne), javax.persistence. ManyToOne ) (error 322) at com.objectdb.jpa.EMImpl.persist(EMImpl.java:376) at uk ... .container (javax.persistence.Id, javax.persistence. ManyToOne ) at com.objectdb.o.MSG.d(MSG.java:61 ... .persistence.Id; import javax.persistence.IdClass; import javax.persistence. ManyToOne ; import javax | |
javax.persistence.ManyToOne JPA Annotation ManyToOne Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies ... that is the owner of the relationship. The ManyToOne annotation may be used within an embeddable class ... with the dot notation is the name of the respective embedded field or property. Example 1: @ ManyToOne | |
Broken @ManyToOne reference public abstract class A { @Id @ ManyToOne (fetch = FetchType.EAGER, cascade=CascadeType.ALL, optional ... ; import javax.persistence. ManyToOne ; import javax.persistence.MappedSuperclass; @MappedSuperclass public abstract class ChildsSuper { // @Id @ ManyToOne (fetch = FetchType.EAGER | |
ObjectDB Explorer don't show ManyToOne relations Hello support. we have a problem with the ObjectDB Explorer and @ ManyToOne relations. We persist ... ;@ ManyToOne (targetEntity = ModelElementImpl.class, cascade = {CascadeType.REFRESH}) private ModelElement ... ;@ ManyToOne (targetEntity = ModelElementImpl.class, cascade = {CascadeType.REFRESH}) private | |
javax.persistence.ManyToOne.targetEntity JPA Annotation Attribute in javax.persistence. ManyToOne Class targetEntity default void.class (Optional) The entity class that is the target of the association. Defaults to the type of the field or property that stores the association. Since: JPA 1.0 | |
javax.persistence.ManyToOne.cascade JPA Annotation Attribute in javax.persistence. ManyToOne CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded. Since: JPA 1.0 | |
javax.persistence.ManyToOne.fetch JPA Annotation Attribute in javax.persistence. ManyToOne FetchType fetch default EAGER (Optional) Whether the association should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the associated entity must be eagerly fetched | |
javax.persistence.ManyToOne.optional JPA Annotation Attribute in javax.persistence. ManyToOne boolean optional default true (Optional) Whether the association is optional. If set to false then a non-null relationship must always exist. Since: JPA 1.0 | |
Level 2 cache not hit in @ManyToOne Hi! I have 2 entities: User and Item, both @Cacheable. Item has @ ManyToOne private User user. Level 2 JPA cache is activated and it works ok for find by id (tested by changing data in explorer and reading in my app). Problem 1: find by id on Item it's good, it hits the cache, but not for its field | |
JPA Entity Fields ). Every persistent field can be marked with one of the following annotations: OneToOne , ManyToOne ... { String name; @ ManyToOne Department department; } @Entity public class Department { @OneToMany | |
Retrieving JPA Entity Objects retrieval by using a lazy fetch type: @Entity class Employee { : @ ManyToOne ( fetch = FetchType . LAZY ... FetchType . LAZY in either @OneToOne or @ ManyToOne annotations (currently ObjectDB does not distinguish | |
General Performance Issues Illustrated with a Specific Method; import javax.persistence. ManyToOne ; import javax.persistence.OneToOne; import javax.persistence.Table ... ; private String comments; /* Create Properties */ @ ManyToOne (fetch = FetchType.LAZY) private WebUser ... .persistence.TemporalType.DATE) private Date createdOn; @ ManyToOne (fetch = FetchType.LAZY) private | |
javax.persistence.JoinColumn itself is defaulted, a single join column is assumed and the default values apply. Example: @ ManyToOne ... ;} See Also: ManyToOne OneToMany OneToOne JoinTable CollectionTable ForeignKey Since: JPA 1.0 Public Annotation ... . The table in which it is found depends upon the context. If the join is for a OneToOne or ManyToOne | |
Error 363 - Failed to read value of inverse relationship.AUTO) private long id; @ ManyToOne (optional=false) private ETown town; public ETown getTown ... possibleFriends; @ManyToMany(mappedBy = "blockedUserList") private List invisibleUsers; @ ManyToOne private ... ="postedMessages") private Player sender; @ ManyToOne private Player address; protected Message | |
Should derived fields of an EmbeddedId be manually maintained by app code? javax.persistence. ManyToOne ; import javax.persistence.MapsId; import javax.persistence.Version ... ; @ ManyToOne (fetch=FetchType.LAZY) @MapsId("cont") private EContainer container; public EContainer ... ; import javax.persistence.FetchType; import javax.persistence. ManyToOne ; import javax.persistence | |
EntityManager.refresh takes a long time = CascadeType.REFRESH) @NotNull private List answers = new ArrayList (); @ ManyToOne private City city ... .REFRESH) @NotNull private List interests = new ArrayList (); @ ManyToOne (cascade = CascadeType ... = CascadeType.ALL) @NotNull private List paymentOperations = new ArrayList (); @ ManyToOne private PersonLevel | |
Error: Failed to write value of field X using reflection (oneToMany relation), but I can go through this. I have a clase named Pedido, that have a reference ManyToOne to a clase ... Direccion origen; @ ManyToOne (optional=true) private Cliente cliente; //Opcional @Basic(optional=false ... connection on the oneToMany - manyToOne . But I can't figure it out. Someone can help me? elnll002 | |
javax.persistence.AssociationOverride { ... @ ManyToOne protected Address address; ... } @Entity @AssociationOverride(name="address", joinColumns ... class ContactInfo { @ ManyToOne Address address; // Unidirectional @ManyToMany(targetEntity=PhoneNumber | |
javax.persistence.JoinColumn.name is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy, the foreign key column ... . If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne /OneToMany mapping | |
javax.persistence.JoinColumn.table to be in the primary table of the applicable entity. Default: If the join is for a OneToOne or ManyToOne ... bidirectional ManyToOne /OneToMany mapping using a join table, the name of the join table. If the join | |
javax.persistence.MapKey getEmpId() { ... } @ ManyToOne @JoinColumn(name="dept_id") public Department getDepartment ... getEmpId() { ... } ... @ ManyToOne @JoinColumn(name="dept_id") public Department getDepartment | |
javax.persistence.MapsId JPA Annotation MapsId Target: METHOD, FIELD Implemented Interfaces: Annotation Designates a ManyToOne or OneToOne relationship attribute that provides the mapping for an EmbeddedId primary key ... id; ... @MapsId("empid") // maps the empid attribute of embedded id @ ManyToOne Employee emp | |
javax.persistence.OneToMany; } In Order class: @ ManyToOne @JoinColumn(name="CUST_ID", nullable=false) public Customer getCustomer ... getOrders() { return orders; } // In Order class: @ ManyToOne @JoinColumn(name="CUST_ID", nullable=false | |
@JoinColumn(nullable=false)? This is an code example: //bi-directional many-to-one association to AlarmGroup @ ManyToOne ... . But you can use the optional element of the @ ManyToOne and @OneToOne annotations. Similarly | |
OneToMany and cascade delete problem; } and a shared class Offer: @Entity public static class Offer { @ ManyToOne private Product product; @ ManyToOne private Store store; } Naming of this class is not perfect, but in my application Offer | |
Object explorer cannot open odb file. ObjectDB many-to-many relationship { @Id @ ManyToOne (cascade = CascadeType.ALL, optional = false) private User user; @Id @ ManyToOne (cascade = CascadeType | |
Extra uninitialised entities spawned on merge() In the following, Element is a base entity class, with a bi-directional @ ManyToOne -@OneToMany relationship Element owner - List ownedElements , and Example is a subclass entity with a relationship ... ; private Element owner; @ ManyToOne | |
Composite indexes ? #4. Are @Index field used also on relations? @OneToOne, @ ManyToOne ? I don't want to start ... with and without such an index. 4. Are @Index field used also on relations? @OneToOne, @ ManyToOne | |
Optimistic locking: prevent version increment on entity collection attribute will be done from the DB but no success. I have tried to add ManyToOne of the owning side (Readings ... to add ManyToOne of the owning side (Readings), This should not make any difference. added EAGER fetch | |
NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1 serialVersionUID = 1L; @ ManyToOne @Index private City city; @OneToMany(mappedBy = "owner") private List ... serialVersionUID = 33L; @OneToMany(mappedBy = "city") private List persons; @ ManyToOne @Index private Person | |
Merge Issue: Attempt to reuse an existing primary key value; import org.junit.Test; import java.util.*; import javax.persistence. ManyToOne ; public class T1432y ... ; @ ManyToOne (fetch = FetchType.LAZY, cascade = { CascadeType.ALL })   | |
Adding multi part path index on non-embedable object member Is there a way to add single member index on members of a object member which is not configured embedable but is/are mapped by id like the two members below. @Entity public class Customer { @MapsId @ ManyToOne (fetch = FetchType.LAZY) private Merchant merchant; @MapsId @ ManyToOne (fetch | |
Merge with Parent/Child entities not possible.GeneratedValue; import javax.persistence.Id; import javax.persistence. ManyToOne ; import javax ... long id; @ ManyToOne (fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE | |
Is it possible to remove parent/child entities without refresh?.persistence.Id; import javax.persistence. ManyToOne ; import javax.persistence.MapKey; import javax ... ; @Id @GeneratedValue private long id; @ ManyToOne (fetch = FetchType.LAZY | |
Missing (null) elements in eager loaded references children ; @ ManyToOne private Element parent ; etc... } and: @Entity public class DataElement ... children ; @ ManyToOne private DataElement parent ; @Basic private String label ; etc... } Embedable | |
javax.persistence.AssociationOverrides JPA Annotation AssociationOverrides Target: TYPE, METHOD, FIELD Implemented Interfaces: Annotation Used to override mappings of multiple relationship properties or fields. Example: @MappedSuperclass public class Employee { @Id protected Integer id; @Version protected Integer version; @ ManyToOne | |
javax.persistence.Embeddable class PhoneNumber { protected String areaCode; protected String localNumber; @ ManyToOne | |
javax.persistence.EmbeddedId="name", @Column(name="dep_name")) @EmbeddedId DependentId id; ... @MapsId("empPK") @ ManyToOne Employee | |
javax.persistence.FetchType ManyToMany OneToMany ManyToOne OneToOne Since: JPA 1.0 Enum Constants EAGER Defines that data | |
javax.persistence.JoinColumns elements must be specified in each such JoinColumn annotation. Example: @ ManyToOne @JoinColumns | |
javax.persistence.MappedSuperclass protected Integer empId; @Version protected Integer version; @ ManyToOne @JoinColumn(name="ADDR | |
mappedBy problem.IDENTITY) public Long id; public String line; @ ManyToOne public Employee employee; } The address | |
JPA vs JDO - which is more efficient for OneToMany queries?; @Entity class Order { @ ManyToOne Customer customer } Are you saying that the Customer.orders field | |
"Problem" with cross join.JOINED) ... @ ManyToOne private CI ci; subclass CIstring private String text; I am not sure | |
Object as parameter results in exception Hi, I've got a simple JPA2 Criteria query which fails when doing an object equality. I verified this against EclipseLink and over there, it works. I'll Attach some code snippets to help figure it out: @Entity() public class Product{ . . . @ ManyToOne private | |
Are indexes implicitly created for relationships? Do the following annotations @OneToMany @ ManyToOne @ManyToMany @OneToOne imply @Index ? Thanks, Carl FastModel Ben Schreiber Actually these annotations (except @ManyToMany ) should apply @Unique on the @One side. But ObjectDB doesn't apply these indexes automatically | |
Inverse OneToMany Mapping and EmbeddedId.persistence . Id ; import javax.persistence . ManyToOne ; import javax.persistence . OneToMany ... ; public int id ; @ ManyToOne ( ) public A a ; @ ManyToOne ( )   | |
New entity objects are duplicated on merge cascading; @ ManyToOne (fetch= FetchType.LAZY)   ... ; @ ManyToOne (fetch= FetchType.LAZY) B | |
After using the enhancer, Lazy loaded collections are no longer loading. They are set as null; } @ ManyToOne @JoinColumn(name="account_id", nullable=false) public Account account; public Account ... id = 1L; @ ManyToOne   |