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.
>