NickD wrote:
I'm new to your product, but like what I've seen (and understood) so far. I'm in the R&D phase, so help me understand something.
I work for a school district, so we deal with students and such.
If I have a student in my hand (StudentEntity) and I want to get his most current admission record (AdmissionEntity), where would you suggest I add this property? To the StudentEntity class? I'm thinking I would call it something like Student.CurrentAdmission() where it would load just a single AdmissionEntity for the currently instantiated student.
If you suggest I write my own method, can I get at your nifty "This property has already been loaded so don't load this again" settings for that property, or do I need to write my own lazy loader knowledge for that property?
You can do this with the build in code
Getting the most recent item is sorting descending and just read 1 item. So you can call myStudentEntity.SetCollectionParametersAdmissions(1, sorter);
where sorter is a sortexpression on Admission.Date or something.
This will fetch the related entity once, as lazy loading will not load it again. To make the code always fetch the latest when you touch a property which represents a relation (e.g. Customer.Orders), set myStudentEntity.AlwaysFetchAdmissions to true.
See the reference manual for details on these properties / methods, for example the CustomerEntityBase class.