ebean icon indicating copy to clipboard operation
ebean copied to clipboard

Test fetch ID only

Open nPraml opened this issue 7 months ago • 2 comments

Hello @rbygrave ,

I wrote the tests for issue https://github.com/ebean-orm/ebean/issues/3643. In all three cases, I would expect the same SQL query to be output: select t0.id, t0.status, t0.kcustomer_id from o_order t0

nPraml avatar Jun 26 '25 06:06 nPraml

We might have found a solution for this: After the fetchpaths are sorted, and missing paths are added, we check the result and try to remove/convert id-only fetches in a select of the parent path

rPraml avatar Jul 03 '25 14:07 rPraml

Hi @rbygrave ,

We prefer this solution over https://github.com/ebean-orm/ebean/pull/3646. We've adopted this in our fork and successfully tested it in our application. Could you please take a look?

nPraml avatar Jul 09 '25 08:07 nPraml