ObjectDB Database Search

1-50 of 50 results

jakarta.persistence.ManyToMany

Jakarta Persistence (JPA) Annotation Type jakarta.persistence. ManyToMany Implemented Interfaces ... side, and the non-owning side must use the mappedBy element of the ManyToMany annotation to specify ... . The ManyToMany annotation may be used within an embeddable class contained within an entity class

jakarta.persistence.ManyToMany.fetch

Jakarta Persistence (JPA) Method in jakarta.persistence. ManyToMany 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

jakarta.persistence.ManyToMany.mappedBy

Jakarta Persistence (JPA) Method in jakarta.persistence. ManyToMany String mappedBy The field that owns the relationship. Required unless the relationship is unidirectional. Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.ManyToMany.targetEntity

Jakarta Persistence (JPA) Method in jakarta.persistence. ManyToMany Class targetEntity (Optional) The entity class that is the target of the association. Optional only if the collection-valued relationship property is defined using Java generics. Must be specified otherwise. Defaults

jakarta.persistence.ManyToMany.cascade

Jakarta Persistence (JPA) Method in jakarta.persistence. ManyToMany CascadeType[] cascade (Optional) The operations that must be cascaded to the target of the association. When the target collection is a Map , the cascade element applies to the map value. Defaults to no operations being cascaded. Default: {} Since: Jakarta Persistence (JPA) 1.0

Persist error @ManyToMany how to define correct entities relationships

; @ ManyToMany (cascade=CascadeType.PERSIST) private List categories = new ArrayList(); } @Entity public class ... .persistence.EntityManagerFactory; import javax.persistence.Id; import javax.persistence. ManyToMany ; import ... implements Serializable { @Id //@GeneratedValue private long id; @ ManyToMany (cascade=CascadeType.PERSIST

ManyToMany Set is null

@GeneratedValue     private long id;     @ ManyToMany (fetch = FetchType. EAGER , cascade ... {     @Id @GeneratedValue     private long id;     @ ManyToMany (fetch

Removing objects where ManyToMany relationships exist

Consider you have an entity Entity with the following unidirectional relationship: @ ManyToMany private Set setOfOtherEntities; public Set getOtherEntities() {     if (setOfOtherEntities == null) {       setOfOtherEntities = new TreeSet ();    

Retrieving JPA Entity Objects

an explicit FetchType.EAGER setting: @Entity class Employee { : @ ManyToMany ( fetch = FetchType . EAGER ) private Collection projects; : } Specifying FetchType . EAGER explicitly in @OneToMany or @ ManyToMany

JPA Entity Fields

- for references of entity types. OneToMany , ManyToMany - for collections and maps of entity types

jakarta.persistence.MapKeyJoinColumn

; ... } Example 3: @Entity public class Student { @Id int studentId; ... @ ManyToMany // students and courses ... the collection table for the map value. If the join is for a map key for a ManyToMany entity ... column is in the collection table for the map value. If the join is for a map key for a ManyToMany

jakarta.persistence.MapKeyEnumerated

relationship of type Map , in conjunction with the ElementCollection , OneToMany , or ManyToMany annotation ... Employee { @ ManyToMany public Projects getProjects() { ... } @OneToMany @MapKeyEnumerated(STRING) public Map getEmployees() { ... } ... } See Also: ElementCollection OneToMany ManyToMany Since: Jakarta

jakarta.persistence.JoinColumn

entity. If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne ... . If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany

jakarta.persistence.MapKeyColumn

. If the map key is for a ManyToMany entity relationship or for a OneToMany entity relationship using a join ... is for a OneToMany or ManyToMany entity relationship using a join table, the name of the join table

jakarta.persistence.MapKeyClass

one of the collection-valued relationship annotations ( OneToMany or ManyToMany ). The MapKey annotation ... ; ... @OneToMany Map organization; } See Also: ElementCollection OneToMany ManyToMany Since: Jakarta

jakarta.persistence.AssociationOverride

address; // Unidirectional @ ManyToMany (targetEntity = PhoneNumber.class) List phoneNumbers; } @Entity public class PhoneNumber { @Id int number; @ ManyToMany (mappedBy = "contactInfo.phoneNumbers

jakarta.persistence.OrderBy

. Example 1: @Entity public class Course { ... @ ManyToMany @OrderBy("lastname ASC") public List getStudents() { ... } ... } Example 2: @Entity public class Student { ... @ ManyToMany (mappedBy

jakarta.persistence.MapKeyJoinColumn.table

is for a map key for a ManyToMany entity relationship or for a OneToMany entity relationship using ... of the collection table for the map value. If the map is for a OneToMany or ManyToMany entity

jakarta.persistence.JoinTable

ManyToOne , OneToOne , ManyToMany , or OneToMany . See Also: JoinColumn JoinColumns Since: Jakarta

jakarta.persistence.MapKeyTemporal

with the ElementCollection , OneToMany , or ManyToMany annotation. Example: @OneToMany @MapKeyTemporal(DATE

jakarta.persistence.FetchType

ManyToMany OneToMany ManyToOne OneToOne Since: Jakarta Persistence (JPA) 1.0 Enum Constants EAGER Data

jakarta.persistence.CascadeType

::cascade OneToOne::cascade OneToMany::cascade ManyToMany ::cascade Since: Jakarta Persistence (JPA) 1.0 Enum

jakarta.persistence.OrderColumn

annotation is specified on a OneToMany or ManyToMany relationship or on an element collection

Error 363 - Failed to read value of inverse relationship

= PlayerStatus.NORMAL; @ ManyToMany private List friendList = new ArrayList (), friendWishList = new ArrayList (), blockedUserList = new ArrayList (); @ ManyToMany (mappedBy = "friendWishList") private List possibleFriends; @ ManyToMany (mappedBy = "blockedUserList") private List invisibleUsers; @ManyToOne private

Left join fetch behaviour doesn't retrieve children?

.EntityManagerFactory; import javax.persistence.Id; import javax.persistence. ManyToMany ; import javax ... ;               @ ManyToMany (targetEntity ... ; entityChildren.add(new MyEntityChild(name));   }   @ ManyToMany (targetEntity = MyEntityChild.class

jakarta.persistence.JoinColumn.name

. If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne / OneToMany

jakarta.persistence.MapKeyColumn.name

. If the map key is for a ManyToMany entity relationship or for a OneToMany entity relationship using a join

jakarta.persistence.MapKeyColumn.table

Jakarta Persistence (JPA) Method in jakarta.persistence.MapKeyColumn String table (Optional) The name of the table that contains the column. Defaults: If the map key is for an element collection, the name of the collection table for the map value. If the map key is for a OneToMany or ManyToMany

jakarta.persistence.MapKeyJoinColumn.name

the collection table for the map value. If the join is for a map key for a ManyToMany entity relationship or

jakarta.persistence.JoinColumn.table

, the name of the table of the target entity. If the join is for a ManyToMany mapping or for a OneToOne or

How to Remove records from many to many relationship tables in JPA

public class TransportationEvent { ... @ ManyToMany (fetch = FetchType.EAGER, cascade = CascadeType ... { .... @ ManyToMany ( fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) private List transportationEvents ... .annotations.CascadeType.DELETE_ORPHAN) and i applied that as @ ManyToMany (fetch = FetchType.EAGER, cascade

EntityManager.refresh takes a long time

.ALL) private List operations = new ArrayList (); @ ManyToMany (cascade = CascadeType.REFRESH) @NotNull private List selectedPersons = new ArrayList (); @ ManyToMany (mappedBy = "selectedPersons", cascade ... siteAuth; private DialogAction currentDialogAction; @ ManyToMany (fetch = FetchType.EAGER, cascade

Cascading persistence through an inverse field

Hi! I was playing with cascading persistence with @ ManyToMany and inverse @ ManyToMany ... transaction-related code to keep it simple. @Entity public class PointCollection { @ ManyToMany (cascade ... ) { points.add(p); } ... } @Entity public class Point { @ ManyToMany (mappedBy="points", cascade={PERSIST

Find the error...JPA ENTITY HIBERNATE

; import javax.persistence. ManyToMany ; import javax.persistence.ManyToOne; import javax.persistence.Table ... String email; @ ManyToMany @JoinTable(name="chat", joinColumns={@JoinColumn(name="userid1 ... . ManyToMany ; import javax.persistence.Table; @Entity @Table(name = "message") public class message

Mysterious "Attempt to persist a reference to a non managed instance" error

.persistence.Id; import javax.persistence. ManyToMany ; import javax.persistence.OneToOne; import static ... ;  @OneToOne(fetch=EAGER, cascade=PERSIST) public Ostrich ostrich;     @ ManyToMany ... @ ManyToMany (cascade = {CascadeType.ALL}, targetEntity = Passenger.class, mappedBy = "buses")  

joining of tables

: in Employee class: @ ManyToMany @JoinTable(name = "emp_add", joinColumns = @JoinColumn(name ... ", referencedColumnName = "add_id") ) public Set getAddress() { return address; } in Address class: @ ManyToMany

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

Query only works correctly when debug printing results

; @ ManyToMany private List topReqsList; @ ManyToMany private List bottomReqsList; private String name

Problem with merging / persisitng objects with @Embeddable field

public class ProductSet implements Serializable { @ ManyToMany (fetch = FetchType.EAGER, cascade ... Serializable, Convertable { @ ManyToMany (targetEntity = ProductSet.class, mappedBy = "productDemands

Merge Issue: Attempt to reuse an existing primary key value

object share the same child on a ManyToMany relationship with Cascade.ALL constraint. public final class ... ;     @ ManyToMany (cascade = {         

Is there a way to set EAGER fetch on all "ToMany" collection relationships

Given that the default seems to be FetchType.LAZY for all collections @OneToMany and @ ManyToMany . Such as a configuration option. Instead of having to explicitly set fetch in annotation code in every relationship. webel Dr Darren Kelly No. There is no such configuration option, since having EAGER

Speeding up reporting queries with size() on list

field in Inspiration entity. insp.products is a list with 0 to 600 objects. Definition: @ ManyToMany

Join query problem with new statetment

;(...)     @ ManyToMany (targetEntity = Product.class, fetch = FetchType.LAZY)   

How to delete M2M relationship?

In user model class I have the following: public class User implements Serializable {     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;     @ ManyToMany (mappedBy = "attendees", cascade

Relationship Annatations

hi,   what is the purpose of annotating a field with a RDB relationship shuch as OneToMany. ManyToMany etc? sprintf Reuben Alfred Using these annotations is optional in ObjectDB but required by standard JPA. You still need these annotations in ObjectDB to specify cascading / fetch policy and other settings. support Support

Fields in objects not populated in query result.

) private Folder parent; private boolean listable; @ ManyToMany (cascade=CascadeType.ALL) private Map

Example database world.odb

the relationships OneToMany and ManyToMany ? I want to see a working example :-) Robin_2005 Kompan Serge

Memory leak while merging parent with No Cascade annotation with children

.EntityManagerFactory; import javax.persistence.Id; import javax.persistence. ManyToMany ; import javax

Eager load Map

I'm having an issue eager loading a nested map. I've attached @ ManyToMany (fetch=FetchType.EAGER) attributes to no avail. If the map is viewed in the debugger or force iterated in the code it loads ok. The attached code attempts to replicate the scenario. Its not an exact match but is the best I

Explorer bug ? Objects seem to be missing from database in Class view, but are present as references

; webel Dr Darren Kelly This reply applies to both this issue and to support ticket: @ ManyToMany