Only associations that are already fetched are serialized.
This stuff is well-defined in the EJB3 spec.
Yes but sooner or later (sooner in this case) more then I want to send to the client is going to be fetched from the database.
From what I currently understand the only way to avoid this problem is not to use the same class as the Entity and the Seam-Component, and that doesn't feel to good since I probably will need to write all data-classes twice.
I'm working on an app that will have a lot of users. So I cannot affort to store lots of data in the session and I really don't want to send to much data to the client either.
I think that what I'm trying to say is that I trying to make a design that stores the "state" on the client not the "data" - the "data" can be recreated on the server using the "state" from the next request, even as early as in the RESTORE_VIEW phase. Using JSF-rendered currently forces me to store the data somewhere to be able to recreate the view on the next request.
Sorry Gavin - just ramblin' on here - but any comments or design pointers are welcome