book icon indicating copy to clipboard operation
book copied to clipboard

Add text about `model` inside `model` not supported

Open glihm opened this issue 8 months ago • 2 comments

Models inside models is not supported due to how keys are retrieved. We should add a warning about this in the model section.

The workaround is to have a struct with Introspect derived instead. We could add also a reference to that into the introspection page: https://book.dojoengine.org/framework/models/introspect.

glihm avatar Mar 24 '25 17:03 glihm

Could I grab this task?

Simplyauf avatar Mar 28 '25 00:03 Simplyauf

Dojo does not support nested models (i.e., defining a model inside another model). Each model must be declared at the top level. To establish relationships between models, use references or define each model separately.

codeAKstan avatar Apr 09 '25 07:04 codeAKstan