Closed Blacksmoke16 closed 2 years ago
Welcome, @Blacksmoke16! 😀
I think that it would be better to skip explicitly ignored variables, just like in other serializables.
That would be a bit tricky for ivars that are included via other shards. Would either have to reopen the definition of the ivar to add a shard specific annotation, or include it in the source. It wouldn't be as bad if there was a standard "ignore this" annotation but alas that isn't the case.
https://github.com/onyxframework/sql/blob/84734a8803a475e94def3ed590896d1959fdc6b8/src/onyx-sql/serializable.cr#L195
Trying to include my
CrSerializer
shard and I'm hittingCharacter@validator must be nilable, as it's an Onyx::SQL::Serializable variable
.Probably could just select the ivars that have an annotation vs just assuming all of them are Serializable variables.