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.

Reply via email to