Open mizbanpaytakht opened 3 months ago
@DannyvdSluijs not sure if it is a stupid question but do you think it is possible to auto generate the getters for the child collection items? Or is there something different between the various models and their relations making this a piece of logic that needs to be added on a per-model situation?
@DannyvdSluijs not sure if it is a stupid question but do you think it is possible to auto generate the getters for the child collection items? Or is there something different between the various models and their relations making this a piece of logic that needs to be added on a per-model situation?
That is actually a good suggestion. At this point I’m not sure if this can be done easily. I do know that non generated code is being kept when regenerating. So there is nothing blocking adding an additional getter as a short term fix.
When I have time available I can look into the generating code and see if we can add collection getters.
One other idea I’m having (but struggling to find the time for) is to have the manual work I do frequent updates turned into a GitHub workflow.
Get it. Understand it is a bit hard to find the time for this. Was more thinking out loud based on this stalled PR.
@remkobrenters I've been playing around with this idea as you triggered me. One thing I came to realise, is the info that is needed to generate the correct code consists out of the following:
EDM.
prefix from type value taken from the EOL documentationfilter
expression (e.g. "EntryID eq guid'{$this->EntryID}'"
) this is where I am stuck ATM.So this is me giving a status update and not seen an easy solution. So perhaps you can think of something or internally check if there is an "expert" on the deferred
properties?
One final piece of info that I just ran into is commit f527c4f, adding a protected lazyLoad
method)which might also be an option to explore. But that requires me to setup a proper client id/secret which I don't have at this point.
Eager to hear your thoughts.
Before it can be merged can you fix the missing newline (see ci check)