-
1. Re: Using domain objects at view level
luxspes Sep 27, 2008 10:29 PM (in response to juanignaciosl)I have not used Dozer (but I have read about it). I think Seam is supposed to make easier for you to use the same object for display in the UI and to persist in to the database, but I am not completly sure that it succeds 100% in this goal.
For example, if one of your objects fails validation, JPA will force you to discard it (And its data), and re-read it from the UI. In stateless aplications that was not an issue, but here, it forces you to implement pre-validation logic to prevent your objects from being discarded.
Another issue is a somewhat magic interaction between transactions,conversations and entities that I still don't fully grasp, but I am thinking that maybe using Dozer could act as some kind of workaround (my guess is this may only be happening because we are using @Entities) instead of annotation free POJOs (maybe we need a new AFPOJOs acronym?).
Maybe Dozer could evolve to offer something like CarrierWave and better help us with this issues.