Feature proposal #7295
Updated by krileon over 5 years ago
This should store the ID of the source object. Examples as follows.
Asset: profile.57.registration
Object: 57
Asset: blog.79
Object: 79
Asset: groupjive.group.10.photo.20
Object: 20 (OR this could be 10 if we don't need the photo ID for any SQL compares)
Asset: groupjive.group.102.join
Object: 102
Asset: activity.132974.comment
Object: 132974
The idea is that it'll allow extending the queries to check for object access more efficiently and rebuilding of the object won't require a full parse of the asset to get the ID. This should be an int(11) column for efficient int comparison and lookup. Implement for Activity, Comments, and Notifications tables.
For a real world example we could check that the asset is a GJ photo relatively easily with a LIKE usage (not prefixed with %) which will work with index. Now that we know it's a photo we can grab compare the object to the GJ photo row and get the group id and check for access from there. If we don't need to do that we could just store the group id as Object and work from there. This removes the odd SUBSTRING_INDEX compares and allows int = int compares for significantly improved performance.