I’ve created the EqualsAndHashCode utility just for one customer because their 
UI is dynamic.

Normally if you don’t have control over equals and hashCode you can define a 
IdentityProvider for the grid and there for example, use the PK for it.
So the problem is solve,

> On 23 Oct 2024, at 14:29, Lukas Eder <[email protected]> wrote:
> 
> Thanks for the clarification, Simon
> 
> On Wed, Oct 23, 2024 at 2:09 PM Simon Martinelli <[email protected] 
> <mailto:[email protected]>> wrote:
>> IMO, that’s the important message: “what jOOQ thinks a POJO is. It's a bag 
>> of values, not an entity”
>> 
>> As I said, I use DAOs and POJOs only for a demo because I have never found a 
>> real-life use case.
> 
> If I had one wish, I'd wish you simply don't demo DAOs :)
>  
>> One of the issues with equals/hashCode is that if I use the POJOs together 
>> with some frameworks that use those methods, the current implementation is 
>> incorrect in the context of those frameworks.
>> For example, if I use a POJO in a Vaadin Grid and try to refresh the item in 
>> the Grid, this will not work because equals will return false after editing 
>> the POJO.
>> I had the same issue with the jOOQ Records and therefore created this 
>> https://github.com/72services/jooq-utilities
> 
> Yes, this seems to be similar to putting any mutable objects in HashSets 
> (e.g. ArrayList). Though perhaps, the Vaadin Grid should then use an 
> IdentityHashMap to keep track of objects?
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jooq-user/CAB4ELO79J0vPQFJqg-bpKtF0oQhgnaZF5c%3DwK%2BFnay3Spfwiig%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/jooq-user/CAB4ELO79J0vPQFJqg-bpKtF0oQhgnaZF5c%3DwK%2BFnay3Spfwiig%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/DA1450C2-F80C-4D02-927B-A75BAE26F2FF%40gmail.com.

Reply via email to