ObjectDB Database Search
1-50 of 140 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 Entity Objects retrieval by using a lazy fetch type: @Entity class Employee { : @ManyToOne ( fetch = FetchType . LAZY ) private Employee manager; : } The default for non collection and map references is FetchType . EAGER ... FetchType . LAZY in either @OneToOne or @ManyToOne annotations (currently ObjectDB does not distinguish | |
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 | |
Is there any restriction when using fetch=FetchType.LAZY ? Hi, I came across a weird behavior when using fetch= FetchType .LAZY in a complex code ... am using in object declaration @OneToMany(fetch= FetchType .EAGER, cascade = CascadeType.ALL) private ... @OneToMany(fetch= FetchType .LAZY, cascade = CascadeType.ALL) private LinkedList referencedObj | |
@OneToMany(fetch = FetchType.LAZY) list is always null Hello. @OneToMany(fetch = FetchType .LAZY) doesn't work when using EJB or something else related ... , generator = "b") private int id; @OneToMany(fetch = FetchType .LAZY, cascade = CascadeType ... Parent { // ...id @OneToOne(fetch = FetchType .LAZY, cascade = CascadeType.ALL) private ByteData bydaData | |
@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; @OneToMany ( fetch = FetchType . EAGER ) List field3; } The entity class declaration | |
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 | |
jakarta.persistence.OneToOne default no operations are cascaded. Default: {} Since: Jakarta Persistence (JPA) 1.0 FetchType fetch ... to EAGER . Default: FetchType .EAGER Since: Jakarta Persistence (JPA) 1.0 boolean optional (Optional | |
jakarta.persistence.OneToMany (JPA) 1.0 FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly ... . Default: FetchType .LAZY Since: Jakarta Persistence (JPA) 1.0 String mappedBy The field that owns | |
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.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 ... . Default: FetchType .LAZY Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.ElementCollection.fetch Jakarta Persistence (JPA) Method in jakarta.persistence.ElementCollection FetchType fetch (Optional) Whether the collection should be lazily loaded or must be eagerly fetched. The EAGER strategy ... to LAZY . Default: FetchType .LAZY 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 | |
Should derived fields of an EmbeddedId be manually maintained by app code?.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence. FetchType ; import ... ; @ManyToOne(fetch= FetchType .LAZY) @MapsId("cont") private EContainer container; public EContainer ... ; import javax.persistence. FetchType ; import javax.persistence.ManyToOne; import javax.persistence | |
jakarta.persistence.PersistenceUnitUtil.isLoaded(Object) is considered loaded if all attributes for which FetchType .EAGER has been specified have been loaded | |
jakarta.persistence.PersistenceUtil.isLoaded(Object) for which FetchType .EAGER has been specified have been loaded. The PersistenceUtil.isLoaded method | |
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 | |
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 | |
New entity objects are duplicated on merge cascading; @OneToMany(cascade= CascadeType.ALL, fetch= FetchType .EAGER ... ; @OneToOne(fetch = FetchType .LAZY, cascade = CascadeType.ALL)   ... ; @ManyToOne(fetch= FetchType .LAZY)   | |
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 |