Re: equals() method for LoadableDetachableModels

2014-07-14 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-5642 Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sat, Jul 12, 2014 at 7:22 PM, Martin Grigorov mgrigo...@apache.org wrote: I'll test with IdentityHashMap with our main app soon. Martin Grigorov Wicket

Re: equals() method for LoadableDetachableModels

2014-07-12 Thread Martin Grigorov
I'll test with IdentityHashMap with our main app soon. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Jul 11, 2014 at 3:06 PM, Sven Meier s...@meiers.net wrote: Hi, really need to use #equals() ... checking for identity equality should be OK too

Re: equals() method for LoadableDetachableModels

2014-07-11 Thread Sven Meier
Hi, detachable models should never use getObject() in their implementation of equals()? generally this is a good advice: there are several places in Wicket checking for model equality (e.g. ReuseIfModelsEqualStrategy). A detachable model should have enough information to decide equality

Re: equals() method for LoadableDetachableModels

2014-07-11 Thread Ernesto Reinaldo Barreiro
Hi, On Fri, Jul 11, 2014 at 9:51 AM, Sven Meier s...@meiers.net wrote: Hi, detachable models should never use getObject() in their implementation of equals()? generally this is a good advice: there are several places in Wicket checking for model equality (e.g.

Re: equals() method for LoadableDetachableModels

2014-07-11 Thread Martin Grigorov
Hi, I agree that using the primary key should be enough for #equals() but does org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream#check() really need to use #equals() (via Stack#contains()) ? I think checking for identity equality should be OK too. Java Serialization is not

Re: equals() method for LoadableDetachableModels

2014-07-11 Thread Boris Goldowsky
Thank you all for your replies, very helpful! Sven Meier s...@meiers.netmailto:s...@meiers.net wrote: detachable models should never use getObject() in their implementation of equals()? generally this is a good advice: there are several places in Wicket checking for model equality (e.g.

Re: equals() method for LoadableDetachableModels

2014-07-11 Thread Sven Meier
Hi, really need to use #equals() ... checking for identity equality should be OK too I've just tried with an IdentityHashMap and all tests passed (except SerializableCheckerTest#runtimeExceptionTolerance() of course). Sven On 07/11/2014 11:39 AM, Martin Grigorov wrote: Hi, I agree that