About ManyToOne

1-10 of 84Refresh
JPA Doc
73

javax.persistence.ManyToOne

javax.persistence Annotation ManyToOne Target: Fields (including property get methods) Defines ... that is the owner of the relationship. The ManyToOne annotation may be used within an embeddable class ... : @ManyToOne(optional=false) @JoinColumn(name="CUST_ID", nullable=false, updatable=false
JPA Doc
69

ManyToOne.cascade

Annotation Element javax.persistence.ManyToOne CascadeType[] cascade (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded. Default value: {} Since: JPA 1.0
JPA Doc
69

ManyToOne.fetch

Annotation Element javax.persistence.ManyToOne FetchType fetch (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. The LAZY strategy
JPA Doc
69

ManyToOne.optional

Annotation Element javax.persistence.ManyToOne boolean optional (Optional) Whether the association is optional. If set to false then a non-null relationship must always exist. Default value: true Since: JPA 1.0
JPA Doc
69

ManyToOne.targetEntity

Annotation Element javax.persistence.ManyToOne Class targetEntity (Optional) The entity class that is the target of the association. Defaults to the type of the field or property that stores the association. Default value: void.class Since: JPA 1.0
Forum
25

LAZY @ManyToOne field functions as EAGER

to console a lazy @ManyToOne field after the entity manager closes. There is a switch DO_VIEW_BEFORE_CLOSE ... and as expected both a LAZY @ManyToOne field and an EAGER @ManyToOne field are viewable: b.cLazy:{C}[2 ... as @ManyToOne(fetch=FetchType.LAZY) ?   package com.greensoft.objectdb.test.console; import
Forum
24

Conflicting modifiers .... (javax.persistence.Id, javax.persistence.ManyToOne)

, javax.persistence.ManyToOne) (error 322) at com.objectdb.jpa.EMImpl.persist(EMImpl.java:376 ... .CompoundKeyMapItem.container (javax.persistence.Id, javax.persistence.ManyToOne) at com.objectdb.o.MSG.d(MSG ... ; import javax.persistence.Id; import javax.persistence.IdClass; import javax.persistence.ManyToOne
Forum
24

Broken @ManyToOne reference

: @MappedSuperclass public abstract class A { @Id @ManyToOne(fetch = FetchType.EAGER, cascade=CascadeType ... javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.ManyToOne; import ... {   //  @Id   @ManyToOne(fetch = FetchType.EAGER)   public AbstractParent prn; } the output
Forum
24

ObjectDB Explorer don't show ManyToOne relations

Hello support. we have a problem with the ObjectDB Explorer and @ManyToOne relations. We persist ... ModelElement {     ... } @Entity public class FolderImpl {     @ManyToOne (targetEntity ... for the attributes. public class FolderImpl {     @ManyToOne (targetEntity = ModelElementImpl
Forum
23

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