Let's say you like hbm2java and you use it to generate base classes for your domain model.
Let's say you want to use those base classes as your Data Transfer Objects (DTOs) to expose in your service layer, so you can send them to web service clients or to other clients which can't access your persistence layer.
Let's also say that you want to have your actual domain logic implement richer behavior, and you *don't* want your clients to have access to that richer behavior (since it won't ever work outside of your service layer).
I have a small feature request for hbm2java that I think would support this nicely.
I started a thread under "Application Architecture" and then I morphed it into a proposal for a new hbm2java feature to support this use case (I got on a roll and lost track of which forum I was in). So here's the link to the thread in the other forum:
http://forum.hibernate.org/viewtopic.ph ... 98#2189398
I hope this isn't too much of a cross-post :-) Please discuss this over there?
Thanks!
Rob