天天看点

用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,还是会有阻抗失配的情况吧......

继续阅读