You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This request builds upon my previous request where I asked for generated query beans to have copy() method, which you added and I'm very grateful for that. The addition of the method to the generated beans solved most of our problems we had with this, but there's still one thing missing - if you have a generic code that works with subclasses of TQRootBean, it can't call this method, because it's not part of TQRootBean interface. Do you think it would be possible to add public abstract R copy() method to TQRootBean and then mark the generated copy() methods as @Override?
So with the PR above we have added copy() to TQRootBean.
As a followup, TQRootBean is a pretty unfriendly name and is not an interface. It would be better for there to be an interface like QueryBean that it implements and/or a better name like BaseQueryBean / QueryBean.
I'm pondering this, my gut is leaning towards "we should really have an interface here" so:
Add a interface QueryBean
Ideally rename TQRootBean to say BaseQueryBean
Background: TQRootBean has a funky name because (A) I didn't predict this type of use of query beans (and to some extent how important and useful they would become) and because (B) design wise we have "Root Beans" [TQRootBean] and "Associated Beans" [TQAssocBean] with the "Associated Beans" existing to specifically deal with the relationship case and are effectively an implementation detail that most people don't know anything about (so its ok using the funky TQAssocBean name there imo).
I'm sitting here today after many years of using query beans and thinking that they are so very important and that points towards adding a interface QueryBean.
Thank you so much for adding this so fast, we really appreciate it. And yeah, it hasn't bothered me till now, but now that I think about it, I'd have to agree TQRootBean is not the most intention-revealing name I've seen ;).
This request builds upon my previous request where I asked for generated query beans to have
copy()
method, which you added and I'm very grateful for that. The addition of the method to the generated beans solved most of our problems we had with this, but there's still one thing missing - if you have a generic code that works with subclasses ofTQRootBean
, it can't call this method, because it's not part ofTQRootBean
interface. Do you think it would be possible to addpublic abstract R copy()
method toTQRootBean
and then mark the generatedcopy()
methods as@Override
?Expected behavior
I'd like this to compile and work.
Actual behavior
Unresolved method
query.copy()
Additional info
If you decide this makes sense for you, I can try to implement this and create a PR.
The text was updated successfully, but these errors were encountered: