Hello,
I have an Entity mapped in 2 tables of my database.
Is there a way to disable unnecessary joins using @SecondaryTable when we just wanna count all the records? Considering that both tables has exact same number of records it is unnecessary to do a any join to just count it causing loss in speed.
Another point is when we wanna bring only one field. If you wanna retrieve the Name based on the ID, it shouldn't join either since the ID is on both tables.
If anyone can help me with this I would appreciate.
Thanks,
Thiago
|