[sqlalchemy] Composite columns and None

2023-11-14 Thread jens.t...@gmail.com
Hello everyone, I wanted to follow up on the examples on Composite Column Types and in particular setting the mapped composite value in Python-land to *None*. For instance, this class @dataclasses.dataclass class Point: x: int y:

[sqlalchemy] Re: Composite columns and None

2023-11-14 Thread jens.t...@gmail.com
Come to think of it, mapping to *None* doesn’t make much sense because then there’s no mapper. However, it probably would make sense to define an “invalid” mapped Point if all mapped columns are NULL. In that case, I’d still consider adding check constraints to mildly improve integrity,