Hi,
Straight to the problem ...
Should a Persistent/Domain/Business Object call a method of a DAO object passing to it another Persistent object as an argument or not? The question is in the context of an application arhitecture consisting of a DAO layer, Domain Model Layer, perhaps Service layer and UI.
I have been reading this thread
http://forum.hibernate.org/old/898425.html for several times now, and there I can see statements like
business <--- mappers ---> database (Stephen Molitor)
The DAO knows about the domain class; never the other way around! (Gavin King)
It seems that I am misunderstanding the above to the extreme that the business layer should have no reference at all to the DAO/mappers layer. Maybe a business/persistent object should still call the mappers/DAOs, but simply passing/getting other objects to/from the DAO methods, and not itself?
I would appreciate extremely all your feedback so that I can finally clarify this troubling me for a long time now problem!
Best regards,
Deyan