relationship datetime property not hydrated when in relationship group
Hey i just encountered something weird and i am wondering if anyone else encountered this (before submitting a issue on github)
(using postgres btw)
Imagine you have a:
- model:
User
with a one to one relation UserInformation
-> information
- add a datetime column notify_at
to UserInformation
and cast it as such.
- add Group::make([DateTimePicker('notify_at')])->relationship('information')
the date will save on submit (When filled), but the state will not be hydrated at all. I found it will hydrate when you either:
- remove the datetime cast.
- add the ->native(false)
to the picker.0 Replies