Re: [appfuse-user] Aggregate Entities and DAO's

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [appfuse-user] Aggregate Entities and DAO's

Matt Raible-3
I've typically used one DAO for multiple domain objects.  However,
what I've found with this is it's a bit more difficult to test b/c
your tests end up with many test methods for all the different domain
object-specific methods.  Of course, you could also use the generation
"manager" and "dao" beans to do persistence of any objects with
Hibernate.

Matt

On 7/4/05, Josh <[hidden email]> wrote:

> All,
>
> Appfuse creates one DAO per domain object.  Is this a best practice?  For
> example, if I had a Hotel which had a collection of Rooms, does it make
> sense to have both a Hotel DAO and a Room DAO?  Why not consider Hotel to be
> the aggregate root and only have one DAO?
>
> Regards,
>
> Joshua
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]