amplication / docs

Amplication docs
https://docs.amplication.com
Apache License 2.0
16 stars 57 forks source link

BTM- Update the documentation regarding the relations handling #442

Open PazYanoverr opened 3 months ago

PazYanoverr commented 3 months ago

We've updated the code to handle relations in a slightly different way:

1:1 relations: Each of the "1" sides- will have the original field with a suffix of Id. For example if the Orders table had a field called "customer", it will turn into a new field "customerId" with the type being the same type as the Id field of the Customer entity.

1:many relations: The "many" side- will have the original field with a suffix of Id (see above explanation). The "1" side- will have a field with the same name of the orig field, with JSON type.

many:many: Each of the "many" sides- will have a field with the same name of the orig field, with JSON type.

PazYanoverr commented 3 months ago

@mulygottlieb - You are welcome to review, and approve

mulygottlieb commented 3 months ago

Approved, except for the fact you say "field with the name of ID" when in fact it's the original field with a suffix of Id. For example if the Orders table had a field called "customer", it will turn into a new field "customerId" with the type being the same type as the Id field of the Customer entity.

PazYanoverr commented 3 months ago

Thanks @mulygottlieb ! Updated the description accordingly. @dericksozo - FYI

dericksozo commented 3 months ago

Hey @PazYanoverr, I'm taking care of this one in #444.