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

Laravel nested eager loading specific columns in where condition in main relationship

$wo = Warehouse_other_receive_detail::with('item_info.product_sub_group') ->where('item_info.product_sub_group->sub_group_id', 2) ->get(); How to select specific column after relationship in where condition?
0
votes
1 answer

I tried to train an image classifier based on MobilenetV2, but loss has not been able to converge, I am not sure if I use tensorflow correctly

I tried to use the MobilenetV2 model as an image classifier. There are 10 categories, which are randomly selected from ImageNet's classification dataset. But loss does not converge during training, it always tends to fluctuate back and forth with a…
0
votes
1 answer

I want to create a reflection on a generic TEntity class and ienumerating on its properties to eagerly fetch them

I have various models in my code one is MenuEntry which is like- public class MenuEntry : CorporationMetadata, IEntity { public virtual int MenuEntryId { get; set; } public virtual MenuEntryType MenuEntryType { get; set; } …
0
votes
1 answer

Can't Display the data from AJAX Eager Relationship Laravel

Having difficulty to show the data from attendees table in blade view but in the network in the browser, it shows. In blade, it only shows the main model which is Activity and the data from attendees only outputs object. I need to outputs the data…
Michael Ben Gabriel
  • 143
  • 1
  • 2
  • 12
0
votes
1 answer

Tensorflow eager mode support for text summary

I am trying to make a summary of a text using tensorflow with eager mode enabled, for this I am using this code: writer = summary_ops_v2.create_file_writer('some_path', flush_millis=10000) writer.set_as_default() tensor = tf.convert_to_tensor("Some…
0
votes
1 answer

eager excution is not compatible with multiprocessing

I am using tensorflow eager to do calculation. The aim is to allocate the work on all gpus. However, I find that this cannot be done using multiprocessing. Following is the code (it is indeed very short, except for some extra work): import…
ZHANG Juenjie
  • 501
  • 5
  • 20
0
votes
1 answer

tensorflow eager and imperative custom layers

In one deep learning notes (Stanford cs20si), I once saw the following statement regarding eager. I don't quite understand what does the imperative custom layers indicate, and how to understand this code example in the context of imperative custom…
user297850
  • 7,705
  • 17
  • 54
  • 76
0
votes
0 answers

How can I use column in laravel eager posts

How can I use ids in laravel eager posts? This code only returns the first post. That is always 1 . But in some WsStock, there are 3 or 4 or ... posts. $stocks = WsStock::select([ 'id', 'industryIndex', 'nameFA', …
Mohammad
  • 497
  • 3
  • 15
0
votes
1 answer

Could not write content: failed to lazily initialize a collection of role,could not initialize proxy - no Session

I have this error when using FetchType.LAZY Could not write content: failed to lazily initialize a collection of role: com.websystique.springmvc.model.User.userProfiles, could not initialize proxy - no Session Here is my model…
rob
  • 5
  • 2
  • 11
0
votes
1 answer

Issue with JPA. When fetchin eager parent all of its lazy children are also fetched

I am making a spring-boot project and currently I am facing a problem with lazy fetching. I have three classes one that is fetching its children with eager(Incident) and two that are with lazy(FileContent, FileStorage). The structure is: Incident(1)…
0
votes
3 answers

Laravel 5.5 Paginate the Query - Eager Loading

I have a problem and can't figure out how to solve it. I've searched online but still couldn't get a firm answer. What I'm trying to do is to paginate Inquiries table - or the query below. Everything seems to work (at least I'm getting 20 inquiries…
MT513
  • 15
  • 3
0
votes
2 answers

Eagerly load all the related objects

I have two entities: Book: @Entity public class Book { @Id private Long id; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "library_id") private Library library; // Getters and setters } and Library: @Entity public…
Gurwinder Singh
  • 38,557
  • 6
  • 51
  • 76
0
votes
2 answers

Can Sequel eager load a relationship when with_sql is used?

I'm trying to eager load relationship data via the Sequel gem's eager method while using with_sql to define the sql used for the query (it's a fairly complex query). The eager loading doesn't work at all. Instead it produces a single query per…
0
votes
1 answer

ActiveJDBC eager loading of Polymorphic Parents

I am unable to eagerly load the polymorphic parent of a child class. The include statement seems to make no difference. Child Class: @BelongsToPolymorphic( parents = {ParentRequest.class}, typeLabels = {"parent_request"}) public class…
Noah Ternullo
  • 677
  • 6
  • 16
0
votes
1 answer

Laravel one to many relation

Cannot seem to find what I am doing wrong anymore after trying to get something else to work using polymorphic relations.. I have two tables setup: Payments: - id - name - etc.. Deposits: - id - payment_id - name - etc.. My model…
Hardist
  • 2,098
  • 11
  • 49
  • 85
1 2 3
8
9