Home » Search

About OneToMany

61-70 of 149Refresh
Forum
1

composite index not used in query

we defined a composite index for class Action: @Index(name="ssst",members={"startDate","state","subType","type"}) and an index for the OneToMany @OneToMany(fetch=FetchType.LAZY) @Index public List objectsInCharge = new ArrayList(); on running a query like select
Forum
1

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 ... ArrayList();         @OneToMany(mappedBy = "owner",         cascade = CascadeType
Forum
1

How to use JOIN FETCH?

; import javax.persistence.OneToMany; import javax.persistence.Persistence; import javax.persistence ... @GeneratedValue private long id;   private String name;   @OneToMany   @MapKeyTemporal(TemporalType.DATE
Forum
1

Is it ok to put list or map of embeddable objects in entity ?

: @Embeddable public class EmbeddableB implements Serializable { (...) @OneToMany(cascade ... ?   Maybe you can try: @Entity public class EntityA implements Serializable {    (...)     @OneToMany
Forum
1

Is it possible to remove parent/child entities without refresh?

.MapKey; import javax.persistence.OneToMany; import javax.persistence.Persistence; import org.junit ...   private long id;   @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy
Forum
1

Issue with orphanRemoval and multiple EntityManagers

Hi, We have a problem where our database size grows over time more than expected. We've traced it down to the following issue: I have some entities that are using OneToMany relationship ... static class Organisation {         @Id         private long id;         @OneToMany(cascade
Forum
1

LAZY @ManyToOne field functions as EAGER

would expect b.cLazy to not be still resolved. [By constrast, using this approach an unmapped @OneToMany list is not still viewable, although a mapped @OneToMany list is, which I will discuss in
Forum
1

LazyInitialization / join fetch

the fetch join? If so should I do to all fields of List , ie OneToMany or ... do to all fields of List , ie OneToMany or should also be done for joins ? Grateful. Are you using Hibernate? This is the ObjectDB forum not the Hibernate forum. rafael_moreira
Forum
1

LEFT (OUTER) JOIN problem when mappedBy is defined

invoices without items! Only invoices with items. When I remove mappedBy from @OneToMany annotation, LEFT ... (); } } @Entity public class Invoice { @OneToMany(mappedBy = "invoice", fetch= FetchType.EAGER
Forum
1

Left join fetch behaviour doesn't retrieve children?

annotation @OneToMany, @ManyToMany we have ) If Yes, we should inspect the problem in a short test case ... how much collection1 items we have in the bag? ( and no matter kind of JPA annotation @OneToMany, @ManyToMany