Closed jjaybrown closed 7 years ago
I think something like print("[WARNING] Unions are not currently supported by Mongo")
Using fatalError
will crash the whole server.
I personally feel that fatalError
is severely underused. In a lot of cases I'd rather crash the server than start causing unexpected behaviour. Unexpected behaviour could have nasty side-effects, whereas fatalError
clearly indicates the programmer error.
For example:
let array = [0, 1, 2, 3, 4, 5]
print(array[7]) // fatalError
This'll crash your application for the same reason, and rightfully so.
I agree with @Joannis, any attempt to use a Union, should make clear it's not available, crashing the server over unexpected behaviour, or in my case hours of debugging to find it wasn't supported.
siblings within fluent, require unions to be implemented in mongo driver