天天看點

用ActiveRecord能否完美的比對DomainModel?

用ActiveRecord能否完美的比對DomainModel,對此我有些疑問,你有何感想?

看看老馬的定義:

[quote]Active Record

An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.[/quote]

該定義表明Active Record是對于資料庫某一個表或視圖行的封裝,也就是用資料行的方式來建立DomainModel,還是會有阻抗失配的情況吧......

繼續閱讀