0 Replies Latest reply on Nov 26, 2002 10:26 AM by vicrh

    Is it possible to avoid primary key serialization?

    vicrh

      Hello All,

      We are working with BMP beans in a project. As we are aware of the n+1 queries used to retrieve a set of rows from a table, we wanted to avoid the n queries that get each individual row.

      First we thought about using a cache for the rows, but we found useful the approach discussed at:

      http://www2.theserverside.com/patterns/thread.jsp?thread_id=7908&article_count=3

      We have tried to implement it under JBoss, but it seems that JBoss always serialize the primaky key instances returned by the finders, and so the data linked to the primary key is lost (as it should be declared as "transient").

      So this is the reason for my question. Is there any way to avoid the primary keys instances from being serialized while its EJB instances are active?

      Thank you very much.

      Regards,
      Victor