Questions tagged [eager]

eager database fetching: efficiently load related objects along with the objects being queried.

(contrast with lazy fetching or lazy loading)

Related tags

134 questions
0
votes
1 answer

Eager fetching with Joins

Please could someone help me understand the concept of - "Eager fetching with Joins" in Hibernate with a simple example query and table depicting the result of the query. I have searched the net but unable to get an explanation with a good example.…
sid
  • 129
  • 3
  • 11
0
votes
0 answers

Is Haskell's "variable" eager evaluated?

I define a value "x" to be 2 Prelude> let x=2 Prelude> :sprint x x = _ Prelude> show x "2" Prelude> :sprint x x = _ Prelude> x 2 Prelude> :sprint x x = _ Does Haskell uses the concept "variable" at all? In FP like Haskell, everything is a…
vik santata
  • 2,989
  • 8
  • 30
  • 52
0
votes
1 answer

How to make a JAX-RS annotated singleton class EAGERLY instantiated

I am using Jax-RS 2.0 with Jersey 2.22.1 and Java SE 8, deployed in Tomcat 8.0.30. I have the POJO annotated with the appropriate JAX-RS annotations, and its working as expected. I have also annotated the POJO with @Singleton. The class gets lazily…
Alan S.
  • 11
  • 3
0
votes
2 answers

Eager loading returning ID instead of model

I have an issue with Eager Loading using the below code. Issue is with the Status model $ticket = Ticket::where('id', $id)->with(['customer', 'status', 'notes' => function($query) { $query->orderBy('updated_at', 'desc'); }])->first(); If I…
BrendanDodd
  • 237
  • 2
  • 10
0
votes
1 answer

Laravel 5 Eager Loading not working

I look at many search results with this trouble but i can`t get it to work. The User Model: belongsTo(…
Cheycron Blaine
  • 39
  • 1
  • 2
  • 9
0
votes
1 answer

Lazy eager map evaluation

There are basically two options to evaluate a map in Scala. Lazy evaluation computers the function that is passed as a parameter when the next value is needed. IF the function takes one hour to execute then it's one hour to wait when the value is…
Trylks
  • 1,458
  • 2
  • 18
  • 31
0
votes
1 answer

Fully load entity with JPA before detaching it?

I need to do some processing on an Entity. I'd like it to be outside a transaction. The thing is this entity contains some lazy-loaded fields so that my program fails on accessing some of them because of not having a session active. The most natural…
kboom
  • 2,279
  • 3
  • 28
  • 43
0
votes
0 answers

EF Eager Loading does not works with several collections and decimals

I have a problem with Entity Framework and eager loading: If I want to load several Collections that contains decimals only the first two includes deliver the correct data. The third include delivers a number without comma separator: Here's my…
Krolock
  • 59
  • 1
  • 5
0
votes
1 answer

Why Hibernate Eager Fetch Does Not Work?

I was trying to write a simple testing program to simulate two objects in my project and run into trouble. Basically I have two simple object, Parent and Child with one to many relationship. Following are two objects: import java.util.List; import…
0
votes
3 answers

Grails GORM Domain class relationship

Grails 1.1.1 Goovy 1.5.7 In a relationship such this: Author 1 -- n Book n -- 1 Publisher Defined in Grails: class Author { String firstName String lastName static hasMany = [books: Book] static constraints = { …
Ricardo García
  • 325
  • 3
  • 14
0
votes
1 answer

hibernate One-to-many association : subselect or eager

In a grails application, i have a relationship that is by default lazy: class Author{ String name static mapping = { books lazy:false } } I have a criteria API query that fetches the Authors. When i run the query …
user711189
  • 4,383
  • 4
  • 30
  • 48
0
votes
1 answer

JPA EAGER fetch works only if server is restarted

Good evening everybody, this is my first post on Stack Overflow. I have been quite recently introduced to Java 6 EE and, in particular, to JPA as part of the JSF 2.1 framework and I am now facing a strange behavior that I would like you to help me…
algu84
  • 3
  • 3
0
votes
2 answers

Load the whole database with Hibernate

I am using SQLite3 and Hibernate with Java. Can I somehow load the whole database in memory or fetch all data from the database so that I can access mapped objects fastest? For example if we have a Company and Employee classes and in Company we've…
user1305056
0
votes
1 answer

Grails Eager fetching an empty association returns null

I have domain classes as follows Class Author{ String name List books = LazyList.decorate(new ArrayList(), FactoryUtils.instantiateFactory(Book.class) static hasMany = [books:Book] } Class Book { String title static belongsTo =…
vijay tyagi
  • 2,226
  • 3
  • 20
  • 31
1 2 3
8
9