ObjectDB Database Search
1-50 of 106 resultsjakarta.persistence.FetchType
Jakarta Persistence (JPA) Enum jakarta.persistence. FetchType java.lang.Object ∟ java.lang.Enum ∟ jakarta.persistence. FetchType Implemented Interfaces: Constable , Comparable , Serializable Defines strategies for fetching data from the database. The EAGER strategy is a requirement
|
|
jakarta.persistence.FetchType.FetchType()
Jakarta Persistence (JPA) Constructor in jakarta.persistence. FetchType FetchType () Since: Jakarta Persistence (JPA) 1.0
|
|
jakarta.persistence.FetchType.LAZY
Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. FetchType LAZY Data may be lazily fetched. Since: Jakarta Persistence (JPA) 1.0
|
|
jakarta.persistence.FetchType.EAGER
Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. FetchType EAGER Data must be eagerly fetched. Since: Jakarta Persistence (JPA) 1.0
|
|
Retrieving JPA Entities
{ : @ManyToOne ( fetch = FetchType . LAZY ) private Employee manager; : } The default for non-collection and non-map references is FetchType . EAGER , which means the retrieval operation cascades through the field. Specifying FetchType . LAZY in either the @OneToOne or @ManyToOne annotation excludes
|
|
Problem with @Basic(fetch = FetchType.LAZY)
I have a class where two fields are annotated with @Basic(fetch = FetchType .LAZY ... = FetchType .LAZY) private String description; @Basic(fetch = FetchType .LAZY) private String code ... and description properties must have been loaded on the query, ignoring the fetch = FetchType .LAZY hint
|
|
@Lob @Basic(fetch = FetchType.LAZY) is loaded when it's not needed
; @Lob @Basic(fetch = FetchType .LAZY) private byte[] content; And after some queries with Thing ... of the photos despite of using fetch = FetchType .LAZY. How can I fix this memory issue? Vladiator Vlad Myachikov FetchType .LAZY is a hint that JPA implementations are allowed to ignore. Currently
|
|
JPA Entity Fields
. ALL ) MyEntity field2; @OneToMany ( fetch = FetchType . EAGER ) List field3; } The preceding entity class
|
|
General Performance Issues Illustrated with a Specific Method
.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence. FetchType ; import javax ... (cascade = CascadeType.ALL,fetch = FetchType .EAGER) private Person person; @Index private String phn; private String comments; /* Create Properties */ @ManyToOne(fetch = FetchType .LAZY) private WebUser
|
|
Cascade.ALL with LAZY fetchtype does not clean up all references on remove
Hello, I have a tree of entity classes that reference others using Cascade.ALL in combination with FetchType .LAZY. If I now delete a root entity using EntityManager.remove all leaf nodes will not ... the database. If you remove the FetchType everything works. Best regards Markus doppelrittberger
|
|
significant performance decrease
; @OneToMany(fetch= FetchType .LAZY) public List actions = new ArrayList (); @OneToMany(fetch= FetchType .LAZY) public List childNodes = new ArrayList (); @OneToMany(fetch= FetchType .LAZY) public List container = new ArrayList (); @OneToOne(fetch= FetchType .LAZY) public ObjectNode currentLocation; @OneToOne
|
|
jakarta.persistence.ManyToMany
being cascaded. Default: {} Since: Jakarta Persistence (JPA) 1.0 FetchType fetch (Optional ... is a hint to the persistence provider runtime. If not specified, defaults to LAZY . Default: FetchType
|
|
jakarta.persistence.ManyToOne
FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched ... specified, defaults to EAGER . Default: FetchType .EAGER Since: Jakarta Persistence (JPA) 1.0 boolean
|
|
jakarta.persistence.ElementCollection
when defined using generics. Default: void/class Since: Jakarta Persistence (JPA) 1.0 FetchType fetch ... , defaults to LAZY . Default: FetchType .LAZY Since: Jakarta Persistence (JPA) 1.0 Additional JDK methods
|
|
jakarta.persistence.Basic
[] and byte[] . Since: Jakarta Persistence (JPA) 1.0 Annotation Elements FetchType fetch (Optional ... , defaults to EAGER . Default: FetchType .EAGER Since: Jakarta Persistence (JPA) 1.0 boolean optional
|
|
persisting object with long[][] arrays of array
.persistence.Entity; import javax.persistence. FetchType ; import javax.persistence.Id; import javax ... ; @OneToMany(fetch = FetchType .EAGER, cascade = CascadeType.ALL) public long[] time; @OneToMany(fetch = FetchType .EAGER, cascade = CascadeType.ALL) private long[][] a1;  
|
|
jakarta.persistence.Basic.fetch
Jakarta Persistence (JPA) Method in jakarta.persistence.Basic FetchType fetch (Optional) Whether the value of the field or property should be lazily loaded or must be eagerly fetched. The EAGER ... , defaults to EAGER . Default: FetchType .EAGER Since: Jakarta Persistence (JPA) 1.0
|
|
jakarta.persistence.OneToOne.fetch
Jakarta Persistence (JPA) Method in jakarta.persistence.OneToOne FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched. The EAGER strategy ... . Default: FetchType .EAGER Since: Jakarta Persistence (JPA) 1.0
|
|
jakarta.persistence.OneToMany.fetch
Jakarta Persistence (JPA) Method in jakarta.persistence.OneToMany FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched. The EAGER strategy ... . The LAZY strategy is a hint to the persistence provider runtime. Default: FetchType .LAZY Since: Jakarta Persistence (JPA) 1.0
|
|
jakarta.persistence.ManyToOne.fetch
Jakarta Persistence (JPA) Method in jakarta.persistence.ManyToOne FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched. The EAGER strategy ... . Default: FetchType .EAGER Since: Jakarta Persistence (JPA) 1.0
|
|
jakarta.persistence.PersistenceUnitUtil
for which FetchType .EAGER has been specified have been loaded. The isLoaded method should be used to determine
|
|
jakarta.persistence.PersistenceUtil
is considered loaded if all attributes for which FetchType .EAGER has been specified have been loaded
|
|
jakarta.persistence.PersistenceUnitUtil.isLoaded(Object)
is considered loaded if all attributes for which FetchType .EAGER has been specified have been loaded
|
|
Missing (null) elements in eager loaded references
= FetchType . EAGER ) private List costs ; etc... } Hierarchical entities: @Entity public class Element extends BaseCostElement { @OneToMany (mappedBy = "parent" , fetch = FetchType . EAGER ) private List ... extends BaseCostElement { @OneToMany (mappedBy = "parent" , fetch = FetchType . EAGER ) private List
|
|
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
|
|
Performance issue in a query due to compareTo calls
) @ElementCollection private Map values = new HashMap (); @OneToOne (fetch = FetchType .LAZY, cascade ... ; @OneToOne (fetch = FetchType .EAGER) private TCStep step; //For performance reasons, we use a list ... @ElementCollection (fetch = FetchType .EAGER) private Map values = new HashMap (); } btc_es BTC
|
|
Multi threading on DMOs by lazy loading
It is possible to use lazy loading on fields of attached entities by several threads? Example: class EntityZ { @OneToOne(fetch = FetchType .LAZY) EntityX fieldX; @OneToOne(fetch = FetchType .LAZY) EntityY fieldY; @ElementCollection (fetch = FetchType .LAZY) List list; } We want to load the entity
|
|
Is it possible to remove parent/child entities without refresh?
. FetchType ; import javax.persistence.FlushModeType; import javax.persistence.GeneratedValue; import javax ... ; @OneToMany(fetch = FetchType .LAZY, cascade = CascadeType.ALL, mappedBy = "parent ... ; @Id @GeneratedValue private long id; @ManyToOne(fetch = FetchType .LAZY
|
|
Merge with Parent/Child entities not possible
; import javax.persistence. FetchType ; import javax.persistence.FlushModeType; import javax.persistence ... { @Id @GeneratedValue private long id; @OneToMany(fetch = FetchType .LAZY ... long id; @ManyToOne(fetch = FetchType .LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE
|
|
Broken @ManyToOne reference
public abstract class A { @Id @ManyToOne(fetch = FetchType .EAGER, cascade=CascadeType.ALL, optional ... at ChildSuper : package testobjectdb; import javax.persistence. FetchType ; import javax.persistence.Id ... public abstract class ChildsSuper { // @Id @ManyToOne(fetch = FetchType .EAGER
|
|
EntityManager JPA or JDO impl and different behavior
; @OneToMany(cascade=CascadeType.PERSIST, fetch= FetchType .EAGER)   ... ; fetch= FetchType .EAGER, orphanRemoval=true) //@ElementCollection(fetch= FetchType .EAGER) public
|
|
Fetching Collections Puzzle
declare explicitly the fetch strategy for "children" as FetchType .Eager, then how can I retrieve the Nodes stored in this list. Because no matter what I try, if I dont declare the FetchType to Eager, the children field of all my retrieved nodes are of size zero When I declare the FetchType as Eager
|
|
can't get HashMap out of the database
annotating the map with @OneToMany(fetch= FetchType .EAGER). Outside the DAO method only fields ... signingDate; @OneToMany(fetch= FetchType .EAGER, cascade=CascadeType ... class GuestHolder { // Persistent Fields: @Id @GeneratedValue Long id; @OneToMany(fetch= FetchType
|
|
Annotate a Map field with @ElementCollection or @Basic
;ElementCollection , EAGER for Basic ). You may try using an @ElementCollection(fetch= FetchType .EAGER) and see if it is fast as @Basic support Support I tested it already with @ElementCollection(fetch= FetchType ... = FetchType .EAGER) , which may be more appropriate for maps that contain external relationships. support Support
|
|
Transaction isolation support?
own defined as @OneToMany(fetch= FetchType .LAZY) List bookList; (And in this example, there is only 1 object in ... the new book added by B?. And does this change if FetchType .LAZY changes to FetchType .EAGER? In a SQL
|
|
LAZY @ManyToOne field functions as EAGER
, when it is marked as @ManyToOne(fetch= FetchType .LAZY) ? package com.greensoft.objectdb.test ... ; @ManyToOne(fetch= FetchType .LAZY, cascade= CascadeType.ALL) C ... ; @ManyToOne(fetch= FetchType .EAGER, cascade= CascadeType.ALL) C
|
|
@ElementCollection of type enum
Hi! I have in an entity called User with the following field: @ElementCollection(fetch = FetchType ... (fetch = FetchType .EAGER) private Set permissions; saves enum values as ordinal, not String ... ;@ElementCollection(fetch = FetchType .EAGER) containing enums should be order independent. Thanks. zmirc
|
|
Removing an entity throws exception
; @OneToOne(cascade=CascadeType.ALL, fetch= FetchType .EAGER,   ... (mappedBy = "customer", fetch= FetchType .LAZY) private List itemList; @OneToMany(mappedBy = "customer", fetch= FetchType .LAZY) private List otherItemList; ... getters and setters } Only address is filled
|
|
Why are my Map entries not stored?
private long id; @OneToMany(fetch = FetchType .EAGER ... ;@ManyToOne(fetch = FetchType .EAGER) private Ticket ticket = null;   ... = FetchType .EAGER, cascade=CascadeType.ALL, orphanRemoval=true) @MapKey(name="state") @MapKeyEnumerated
|
|
Multiple Collection Fields not update correctly
v2.8.8_2 I have an entity that has 2 collection fields: @OneToMany(fetch = FetchType .EAGER) Collection position; @OneToMany(fetch = FetchType .EAGER) Collection rotation ; Now if I persist them so the values are: position
|
|
ManyToMany Set is null
@GeneratedValue private long id; @ManyToMany(fetch = FetchType . EAGER , cascade ... = FetchType . EAGER , cascade={CascadeType. DETACH ,CascadeType. MERGE ,CascadeType. REFRESH }, mappedBy
|
|
List of Enum Values in an entity
LAZY to EAGER : private @OneToMany(fetch= FetchType .EAGER) List flags; According ... make a difference for ObjectDB, but to remove this error / warning try: private @Basic(fetch= FetchType .EAGER) List flags; support Support
|
|
Does ObjectDB support lazy loading?
to @OneToMany(fetch= FetchType .EAGER), the properties can be read. It seems to me that ObjectDB doesn't ... A { @Id @GeneratedValue Long id; @OneToMany(fetch= FetchType .LAZY, cascade=CascadeType.ALL) List list
|
|
Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)
() { return ownedElements; } private Element owner; @ManyToOne(fetch = FetchType .LAZY) @JoinTable(name ... , but there are other cases without these that also exhibit the problem. Also, I don't think the FetchType ... is to set the fetch type to EAGER: @OneToMany(mappedBy = "owner", cascade = CascadeType.ALL, fetch= FetchType
|
|
Best practise loading big data
.persistence . FetchType ; import javax.persistence . Id ; import javax.persistence . OneToMany ; import ... ; @OneToMany (cascade = CascadeType . ALL , targetEntity = MyStepBlock . class , fetch = FetchType ... (cascade = CascadeType . ALL , targetEntity = MyStep . class , fetch = FetchType . LAZY ) ArrayList steps
|
|
Tracking changes to new collections (in enhancement mode) after flush
= "uid") private String uid; @OneToOne (fetch = FetchType .EAGER, cascade = {CascadeType.REFRESH, CascadeType.DETACH }) private ModelElementImpl element; @OneToMany (fetch = FetchType .EAGER, cascade ... uid; @OneToOne (fetch = FetchType .EAGER, cascade = {CascadeType.REFRESH, CascadeType.DETACH }) private
|
|
ArrayIndexOutOfBoundException
{ @OneToOne(fetch = FetchType .EAGER) private CacheableJobInfo ji; @OneToOne(fetch = FetchType .EAGER) private ... . The problem dissapeared when removing the @OneToOne(fetch = FetchType .EAGER) annotation. I am not
|
|
ClassCastException after upgrade to 2.3.5_03
, cascade=CascadeType.ALL, fetch= FetchType .EAGER) private Object payload; @OneToOne(orphanRemoval=true, cascade=CascadeType.ALL, fetch= FetchType .EAGER) private Map metadata; ... In this case the "payload
|
|
spuriously objectdb objects have null references
definitions are (for the null references above): ... @OneToMany(fetch= FetchType .LAZY) @Index public List actions = new ArrayList (); ... @OneToMany(fetch= FetchType .LAZY) @Index public List childNodes
|
|
Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled
.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence. FetchType ; import ... { @OneToMany(fetch = FetchType .LAZY, cascade = CascadeType.ALL, orphanRemoval = true)  
|