0
Besvaret
reference types
The example shows this (right) type of reference, but I can only find how to change 1 side of a reference and the other side will always be the one you see on the left here.
How do you change the other half of a reference?
Kundesupport af UserEcho
I'm still new to most of this but I was wondering how to get the (0 reference?) from the example, the ----o-- because all other references (also another self reference) becomes a one reference ------|-- .
And there doesn't seem to be anything diferent in the properties of each reference
Take a look:
In this example, a record in the "self_reference_example" MUST have a value in "mandatory_id" column (cannot be NULL), and doesn't have to have "not_mandatory_id" set (can be NULL).
This difference is very important in this case, because it's a self reference. When you insert the very first record - what "mandatory_id" will you set? You don't have any values there so far. The only possibility would be to set the same value as "id". Most commonly this is not the desired structure, that's why Vertabelo shows a warning in case of mandatory self-reference.
I hope this helps.
By the way, I spotted an error in our example model. The column "parent_category_id" should be marked as "nullable". We'll fix it soon.