Active Record doesn't require a mapping file, as Hibernate does; in fact, a developer working with Active Record doesn't need to code getters or setters, or even the properties of the class.
与Hibernate一样,Active Record不需要映射文件;实际上,使用Active Record的开发人员不需要对getter或setter、甚至类的属性进行编码。
In this case, we will follow the Active Record pattern and wrap a database row with a class capable of all database operations. Its code is shown below.
在本例中,我们将遵循active Record模式并用能够执行所有数据库操作的类封装数据库行。
应用推荐