Open itaranto opened 11 months ago
Incremental filing at the moment is unspecified. QRM
will append to non-empty array, but it will not try to group result set into existing array elements(it will create a new array element). I'm not sure how managed to fill Vulnerabilities
or Threats
of the existing components
. This shouldn't be possible.
Incremental filing at the moment is unspecified.
QRM
will append to non-empty array, but it will not try to group result set into existing array elements(it will create a new array element). I'm not sure how managed to fillVulnerabilities
orThreats
of the existingcomponents
. This shouldn't be possible.
Maybe I've got confused during my testing, you're saying each one of QueryContext
calls will append to the array, so effectively having the same component twice, one with vulnerabilities and the other with threats. Is that right?
Yeah, I suspect so.
OK, you can close this then.
Unless someone can suggest a way to "preload" relations in a more efficient way, I was using lots of joins for this which doesn't scale at all.
Thank you.
I'm attempting to optimize the query presented in this issue, this slightly different model that the one presented there:
The idea is simple: instead of doing one
LEFT JOIN
per each "sub-entitity", I do one query per-sub entity and then I reuse the same destination slice. Very similar to how GORM'sPreload
works.This works fine for populating the "parent" entity, but when populating the "sub-entitities", then the last seem to wipe out the previous ones.
Let me explain this in code which will be clearer:
It seems the QRM doesn't support "incremental" filling of a struct or silce, I'm I wrong?
Is there a way to do this?