Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Allow custom field to be used for relation #19

Open
bombergio opened this issue May 3, 2021 · 1 comment
Open

Allow custom field to be used for relation #19

bombergio opened this issue May 3, 2021 · 1 comment
Assignees

Comments

@bombergio
Copy link

bombergio commented May 3, 2021

Currently, only the id field is allowed to be used for the relation.
That would generate unnecessary fields where relation could be made by the already present field.
Example:
Type Volume and Volume Attachment. Volume attachment have field VolumeId, but it could not be used to for the relation mapping.

@roneli
Copy link
Contributor

roneli commented May 23, 2021

Sorry for the late reply, see related cloudquery/cq-provider-aws#62

We are currently working on this problem.

One solution to reduce multiple ids is to allow the user define the tables "id or ids" if not we will auto generate one i.e volume_id column will be id = true.

This will remove unnecessary fields and will allow the provider's id to be used instead of a generated one also making queries more simpler.

@roneli roneli self-assigned this May 27, 2021
@roneli roneli closed this as completed Jul 6, 2021
@roneli roneli reopened this Jul 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants