plone / Products.PlonePAS

User and group implementation for the Plone CMS and Zope PluggableAuthService
6 stars 21 forks source link

Wrong class name `memberdata.MemberData`? #60

Open d-maurer opened 3 years ago

d-maurer commented 3 years ago

"https://community.plone.org/t/migration-error-v5-1-6-to-v5-2-4-cache-values-must-be-persistent-objects/13626" reports a migration problem which almost surely results from a change in the persistency of memberdata.MemberData which formerly was persistent and now is a temporary adapter. Changing the persistency of a class is a very bad idea because it makes it almost impossible to load existing class instances from the ZODB.

Products.CMFCore.MemberDataTool (the conceptual base for memberdata) has two classes: the persistent MemberData class to actually store member properties and the temporary MemberDataAdapter as an adaptation/integration point. I suggest that memberdata follows this structure and use MemberDataAdapter for its current MemberData; to avoid migration problems, it likely should also define a new class MemberData as a wrapper of that of CMFCore.