After much flailing, learning, and more flailing, I’ve finally made some good progress on managed database access for dynamic objects. I have meta information being stored in several table which details dynamic object types and their properties. That part of the database is well-defined while I have another database access which is reconfigured when changes to the meta information are made.
- If a new dynamic object type is created, the dynamic access session is reconfigured to take in to account a new table for that object type.
- If a property is added to an existing object type, a new column is automatically added to the table
- The session reconfiguration is done only once per save request (ie. if 10 new object types come over from the server, all updates are applied to the model before updating the session instead of reconfiguring the session 10 times)
- There’s currently no plan in place to remove properties from object types but entire object types can be removed (similar to drop table)