Hello Ryan, Do you think it would be good to add documentation to AbstractStore > hashCode and equals?. Was having some problems with changing hashCodes for > record objects, so I think documentation might help to say that hashCode > changes when any field values changes. > > Also some criteria for what 2 records are considered equal? >
Good idea. I can pull up hashCode() and equals() declarations to org.jooq.Record to add some Javadoc. This is registered as feature request #2113 https://github.com/jOOQ/jOOQ/issues/2113 This topic was discussed recently in another thread: https://groups.google.com/d/topic/jooq-user/SAGC0FZtJrs/discussion Two records are considered equal when their respective row value expressions could be considered equal as well according to the rules of the SQL standard. I.e. ROW(1, 'a') = ROW(1, 'a') ROW(1, 'b') <> ROW(1, 'a) In addition to the SQL behaviour, jOOQ can also check two "incompatible" records for equality: ROW('a', 1) <> ROW(1, 'b', 2) Obviously, hashCode() will thus depend on equals() behaviour jOOQ 3.0 will also let org.jooq.Record implement Comparable: https://github.com/jOOQ/jOOQ/issues/2107 The same SQL rules will apply, e.g. ROW(1, 'a') < ROW(1, 'b') I'd write some up for you, but I don't think I can write nice sounding > english too well, and all your other documentation seems so well written!. > That's alright. I'll can do it. Cheers Lukas
