BelongsTo empty on create (but not edit) #4191
Unanswered
johnpuddephatt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm a bit confused by some behaviour I'm seeing with a BelongsTo relationship in Nova and would welcome any input anyway might have!
I have a model called 'Page' which has a belongsTo relationship called 'parent_page':
On my Nova resource for Page, I have the following:
This works as expected when editing an existing page, however when creating a new page the select box is empty despite having a number of pages existing in the database.
There are no errors. The difference is that the first query below returns with an empty resources array while in the latter the resources array is populated as expected:
I'm not sure if I'm missing something obvious or if there's a bug in Nova causing this behaviour.
Beta Was this translation helpful? Give feedback.
All reactions