Orchard CMS Database Part vs PartRecord

折月煮酒 提交于 2020-01-06 09:01:12

问题


In Orchard database, there is tables name ending with 'Record' and other with 'PartRecord'.

What is the logic behind that?


回答1:


The tables for a part record should end in "PartRecord". If a table ends in "Record" without "Part" in front, it shouldn't map to a part record. For example, "ContentItemRecord" is a record, but not a part record. ContentItem is not a part.




回答2:


Content part records are record classes that store content part data in the database.

While its not mandatory to have a part and a part record, it is a good practice to split the real data model (the record) from the model you are going to manipulate and/or read (the part).

The naming of the tables are all up to the module developers, but usually they are postfixed with PartRecord.

Looking at my Orchard database, I do not see any tables ending with Part. My guess is that with your application they are custom modules or third party modules, where the developer chose to postfix it with just Part.



来源:https://stackoverflow.com/questions/26407083/orchard-cms-database-part-vs-partrecord

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!