I couldn’t think of a good name for this topic, so I’ll try to give an example of what I am trying to achieve.
Lets assume I am trying to capture someone’s address history. I have an “AddressHistory” schema, which defines the period of time I wish to capture dates for. There is an “Address” struct which belongs to the “AddressHistory”
I would like to prevent users adding Addresses with a move in date after the end of the period of time defined in the “AddressHistory”
So basically the parent “AddressHistory” constrains the valid data for it’s components (Addresses)
Should I be passing an Address changeset to an AddressHistory.cast_address() fn?
Is there a best practice for something like this?