-
Notifications
You must be signed in to change notification settings - Fork 40
Resource property inconsistencies #62
Comments
That's a good point. I'd go with the following convention |
I'm fine with |
Yes, the current id system is a little flawed, but it was a simple workaround to release an initial SDK first. There are a few complexities with making the FK point to the Initially we added a solution in the SDK so you can decide what fields create a unique ID (i.e id = true in the column, and if non are stated auto Id is generated, usually used for embedded relation tables) making it more consistent, but we decided to leave it out for the first release. (since it had some problems without history support) I see a few options here:
Tell me what do you think of the purposed options? |
Totally understand
Though could you use bucket name since that is unique? Seems like every resource should have something that makes it unique.
I'm not sure I fully followed to be honest, but I generally get the complications. Basically there are two headaches/inconsistencies I've been noticing.
With respect to 2, it seems that the only way to set up foreign keys at the moment is if you fetch a resource as a subresource. It would be nice to be able to specify a FK even if you didn't fetch in that manner. |
@James-Quigley
about this, maybe in the future we will add for columns to add a reference cross resources, the only problem with this that it if you don't fetch vpcs than the vpc_id will say that the FK doesn't exist and cause an error. Unless, I missed the problem here fix me if I am incorrect. |
It would be nice to update and enforce a standard going forward. Namely around things like:
id
, but the aws provided id sometimes isresource_id
, sometimes it includes the name of the resource e.g.vpc_id
.id
(uuid) of the target resource. But there are many places foreign keys aren't used, but an implicit reference to another resource exists, and the aws provided ID is used. If you do any manual joins, it can sometimes be confusing (mostly because of the above point) whether or not to point toid
orvpc_id
etc.The text was updated successfully, but these errors were encountered: