I just got bit by a nasty (and rather stupid) bug today. I was pulling
a toMany relationship, iterating it, and transforming it into another
object. I decided to get clever and use a BeanUtils Transformer to
clean up the code a bit and ended up transforming the list that
actually belonged to Cayenne (in other words, replacing *DataObjects
with non-DataObjects).
Obviously the easy answer is that I shouldn't be careless, but I'm led
to wonder if it wouldn't be handy for the super classes to include a
Collections.unmodifiableList() wrapper around the ToManyList?
I toyed with it quickly and it seems to work fine. Is there ever a
benefit to having the reference to the DataObject's ToManyList?
Cris
This archive was generated by hypermail 2.0.0 : Tue Jan 10 2006 - 22:19:04 EST