What should I persist in the db to identify a group?
I may need to migrate this to another system IE: Dev to Test
Discussion posts and replies are publicly visible
The responsible group is tied to a class of data. We have standard groups/levels. These are essentially templates or recommendations but could be different.
Gotcha. You'll just need to design around the Group ID being different when deployed, then. One helpful thing here is, you can create constants that refer to each group in question (assuming your collection of groups will be static and pre-set, versus dynamic and procedurally-created), and of course a constant's group reference will persist between environments, and regardless of which environment you're in, will return the correct Group ID for that environment when you reference it.
wouldn't i have the same problem? I have a groupid in the saved data.... I want to transfer this to the other system. I would still need to translate the UUID to the corresponding groupid in the other system.How its transported isn't the issue. it's translation from UUID to groupid.
This might work or at least make it easier to update the stored groupids. So the deployment "post" process would just need to resaved the groupids that the constants point to. Essentially that is how we store the UUID that needs translation. It's cleaner I like it - Thanks
No. Your objects are defined in the database. When you "send" a new object, you create that group on the target system and store the ID to your table.
Ah I see - that might involve a change in design - but i see how that would work. creating the groups on the fly.
Exactly. It it a bit of effort in the beginning, but makes things super easy later on.
It can be a bit mind-bending when you develop this, because you call APIs on the same system and create new objects in the same table :-)