Larry,
You just gave me the biggest duh moment. I totally forgot that my
"Attributes" had to be Serializable and had assumed it was already. In
my case, I don't really ever use the "Attributes" class as it's just a
specialty helper to load up a Properties object in my domain class; so I
completely overlooked it.
Thanks for the pointer.
Larry Meadors wrote:
Because whe you serialize Product, the list of Attribute objects
cannot be serialized, so...kaboom.
Make Attribute serializable, and it'll work.
Larry
On 1/13/06, Perry Nguyen <[EMAIL PROTECTED]> wrote:
I'm having a problem with a simple N+1 selects problem.
I have some objects akin to:
Product implements Serializable {
List attributes;
String id;
}
Attributes {
String name;
String value;
}
and I do something along the lines of
<resultMap id="productResults" class="Product" groupBy="id">
<result property="id" column="PRODUCT_ID"/>
<result property="attributes" resultMap="Products.attributeResults"/>
</resultMap>
When I go to Serialize Product, I end up with a
NotSerializableException. Making 'attributes' transient makes the
exception go away.
What can I do to make the List serializable? Or what is a way I can
workaround this?
Thanks.