I don't see an advantage to putting it in the model rather than the class
behind the model. It's still a get/set(list) interface and walking the lists
for changes to do add/remove.
-troy
On Wed, Sep 16, 2009 at 11:03 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
you can always create a model that uses your own add/remove methods.
-igor
On Wed, Sep 16, 2009 at 8:00 AM, Troy Cauble troycau...@gmail.com wrote:
I have classes with convenience functions that manage
bidirectional associations
public void addFoo(Foo f) {
foos.add(f);
f.addBar(this);
}
At one point I thought Wicket was using my add/remove convenience
functions (since I'd provided no get/set), but I now realize that it's using
reflection to get to the (private) list.
I could write get(list) set(list) convenience functions. It seems a little
tedious, though. Are there any utilities that would help?
Will clearing and adding everything on my list generate unnecessary DB
operations? Must I walk the lists for changes?
I haven't run into any real issues yet based on my add/remove routines
not being used. Does lazy loading cover for that in some cases?
Thanks,
-troy
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org