vapor / fluent-kit

Swift ORM (queries, models, and relations) for NoSQL and SQL databases
MIT License
217 stars 116 forks source link

[Q]: Generic representation of a relationship #606

Closed wibed closed 4 weeks ago

wibed commented 6 months ago

Describe the issue

Vapor version

-

Operating system and version

-

Swift version

-

Steps to reproduce

-

Outcome

-

Additional notes

to modularize the codebase into its substantial parts i would like to represent relationships generically. yet find myself unable to do. unlike authentication (Authenticatable) which only has one table requirement. there might be others which require a more complex representation.

atm i can create three protocol assign them a module by expecting one to conform to it and create keypaths to express the relationship between them.

what i miss is the ability to express the requirement for the table between those protocols. yes there are pivots which are expressed in keys aswell but the exact layout of the table relationship thats necessary is not explicitly expressed. one has either to know or kinda guess what the intention is.

wibed commented 4 weeks ago

i have resolved it. yet can not disclose how exactly. if you encounter this issue dont hesitate to contact me.