ObjectDB ObjectDB

Internal Website Search

1-10 of 91 resultsRefresh
139

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 javax
134

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
132

Broken @ManyToOne reference

: @MappedSuperclass public abstract class A { @Id @ManyToOne(fetch = FetchType.EAGER, cascade=CascadeType ... .FetchType; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.MappedSuperclass; @MappedSuperclass public abstract class ChildsSuper {   //  @Id   @ManyToOne
80

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) public
76

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
76

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
76

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
76

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
52

JPA Entity Fields

: OneToOne, ManyToOne - for references of entity types. OneToMany, ManyToMany - for collections and maps ... relationship: @Entity public class Employee { String name; @ManyToOne Department department
32

JPA Annotations for Relationships

Reference (JavaDoc) of JPA 2 relationship annotations, including @ManyToMany, @ManyToOne, @OneToMany, @OneToOne, @OrderBy and @MapKey.

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support