cycle / docs

Cycle ORM Documentation
https://cycle-orm.dev/docs
110 stars 38 forks source link

Add more info about `nullable` option in relations #159

Open roxblnfk opened 1 year ago

roxblnfk commented 1 year ago

When working with ORM, users often encounter the error

Cycle\ORM\Exception\TransactionException: Transaction can't be finished. Some relations can't be resolved:
Create new `asset`
- asset.services:asset (Cycle\ORM\Relation\ShadowBelongsTo)

This is related to the fact that the nullable: true option is not set in HasMany, HasOne, and other relations.

This needs to be better highlighted in the documentation.