On Mon, Mar 8, 2021 at 10:20 PM Gmail <robjsarg...@gmail.com> wrote: > > Given that I don't think jOOQ will be able to add enough type safety to > CTE (or derived table) building (there's > https://github.com/jOOQ/jOOQ/issues/1969, but it will just add some type > safety, not a great user experience, I think), I think moving some logic > into views or TVFs is often an option worth considering. > > Indeed I had to cast nearly everything in my compiles-but-wrong attempt > > from(extras).join(MARKERSET_MEMBER).on(extras.field("xord") == >> (MARKERSET_MEMBER.ORDINAL)) >> java equals operator silently kills it > > > Is this Scala or Groovy? I've considered adding a @Deprecated annotation > on Field.equals(). There's already Javadoc warning of this API misuse, but > deprecation warnings might be even better. Would that have helped in your > case? > > Well in my case (java) the == was just habit and that of course became > “FALSE”. > I must go back and look for old Field.equals() that might still be lying > around but I think I used .equal() or now .eq(). >
I see. Well, the on(Boolean) method that accepts this result has been deprecated in jOOQ 3.8 (https://github.com/jOOQ/jOOQ/issues/4763), and will be removed in 3.15 (https://github.com/jOOQ/jOOQ/issues/11242), so while it is still possible to type Field.equals(Field), it will no longer be possible to pass that expression to any jOOQ API where Field.eq(Field) or Field.equal(Field) was intended. -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO7x62FFTLa2bTXPerNdq8LM2BeoGZipapZ5hvQSV%2BrMhA%40mail.gmail.com.