문제

I have a simple question and I hope I can find answer here! Can we mix hibernate model and DAO in same class? Is there a design Pattern which specify this?

Thank you

도움이 되었습니까?

해결책

I think you're referring to ActiveRecord pattern, there the model class has methods to save(), get(), etc. This pattern is implemented in frameworks like Django and Ruby n' Rails. Hibernate uses Data mapper pattern instead.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top