lazy-loading

EclipseLink lazy loading hangs on reference class

岁酱吖の 提交于 2019-12-11 04:55:57
问题 I am attempting to query a person by id and in my schema below i have a @OneToMany reference between Address and Person and a ManyToOne reference between person and School. I use a named query and query hints to get the best performing query for this simple task but looking at the stack trace (Relevant parts posted), EclipseLink generates three Select statements when all i want is the person object by id? Using eager fetching was killing performance and so my question is how can i simply

Hibernate is loading lazy objects without being asked for

[亡魂溺海] 提交于 2019-12-11 04:41:46
问题 In order to keep transfered data small I created two entities for my files in the database. The fileheader to keep some general informations about the files and the fileblob, including fileId and the blob. Often, I only need to ask for general fileinformations. If I now ask for a list of fileheaders, hibernate unfortunatelly selects the fileblob too (each one in a single select). So here is my example: Extract from Fileh.class: @OneToOne(mappedBy = "fileh", targetEntity = Fileblob.class,

EF lazy loading & fluent API creates additional field in table

流过昼夜 提交于 2019-12-11 04:28:53
问题 Here is my code - first, Attachment class: public class Attachment{ (...) public int UserId { get; set; } public virtual User Author { get; set; } public int? BasicMedicalDataId { get; set; } public virtual BasicMedicalData MedicalData { get; set; } } Here is BasicMedicalData class: public class BasicMedicalData{ (..) public virtual ICollection<Attachment> Attachments { get; set; } } As you can see, Attachment can have optionally one connected BasicMedicalData object. BasicMedicalData can

C# Entity Framework lazy loading if not detached

痴心易碎 提交于 2019-12-11 04:26:01
问题 I am trying to do some process against every object in my EntityFramework OnSave. Part of this process involves turning the object into a Binary object. It is taking FOREVER to Serialize and I am about 99% positive that it is because we are using Lazy Loading on our EntityFramework and it is grabbing Lazy Loaded objects that are accessed in PartialClasses. I tried detaching my object from the ObjectContext, but my coworkers have used Lazy Loading all over our application without first

BrowserAnimationsModule does not work when imported in core module

谁说胖子不能爱 提交于 2019-12-11 03:41:13
问题 I divided bigger app into modules (feature modules, core module and shared module). I am using Angular Material and therefore I imported BrowserAnimationsModule . I placed it in Shared Module and everything works fine, but the problem is arising when I want to lazy load some feature modules - then I have error about double import of BrowserModules. I know that BrowserAnimationsModule should be imported by Core Module, but when I am trying to do that, I get following error: Uncaught Error:

Angular 6 to 7 upgrade resulting an error of missing startup module using lazy loading concept

↘锁芯ラ 提交于 2019-12-11 03:24:35
问题 UPDATE On my question I have added "BaseUrl": "./", to tsconfig.app.json and I got the following error: error TS5023: Unknown compiler option 'BaseUrl'. I think they mean in tsconfig.json and the baseUrl already added in. END of Update I updated my angular project to angular 7 using the following commands: npm install @angular/animations@latest @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest

Dynamic Component Loader vs. Lazy Loading

别说谁变了你拦得住时间么 提交于 2019-12-11 02:21:33
问题 What is the difference between Dynamic Component Loader and Lazy Loading ? I need to build an application that needs to have an <router-outlet> at the root of the application. My Problem is that I don't know how to implement a Component that renders Child-Components according to data, dynamically. My current approach builds up on Dynamic Component Loader , but using this technique I have issues concerning tracking my location, navigate back, etc. Is there any best practice for using "multiple

EnumerateFiles() equivalent in .NET 3.5

[亡魂溺海] 提交于 2019-12-11 01:26:45
问题 I am trying to clean up over 150K of files within a directory using .NET 3.5 and PowerShell. Since there are so many files I do not want to impact the server performance by reading everything in at once. Is there any mechanism with .NET 3.5 or PowerShell or methods accessible via PInvoke that would allow me to lazily load the files? Thank you for your assistance. 回答1: If by "load" you mean to get a list of the files in a directory in a lazy manner, you have a couple of options. As of .NET 4.0

Lazy Load or HUGE CSS-sprite (9MB in size)

删除回忆录丶 提交于 2019-12-11 01:12:35
问题 The conditions: It's a movie website with approximately 1000 images of 15kb Approximately 70% of all images will be loaded on a page visit Images will have a long expiry date. I think I will chose CSS-sprites because most images will be loaded by the visitors any way. But the CSS-sprite of all images are 9MB and 15000x2000px. Even if I devide it into 3 sprites it's 3MB :S Maybe such big sprites will cause some problems? Will images be cached by the browser even if they are 3-9MB? Will the big

Where is the lazy quoted route in Angular 2?

时光毁灭记忆、已成空白 提交于 2019-12-11 00:32:18
问题 I've watched this clarifying keynote in which Papa Misko presents the new routing system introduced in the RC version. It's contained in the presentation the solution for the "Last Lazy Loading Puzzle Piece" , and that relies on quoting the route component name as shown in his own example: {path: 'simple', component: SimpleCmp} // Non-lazy route {path: 'simple', component: 'SimpleCmp'} // Lazy route But its not working to me! The typescript compiler is complaining though. Here is the error: