BIMserver
BIMserver copied to clipboard
Deserialization of invalid files with single references instead of aggregations
When checking in an IFC-SPF with a single reference where an aggregation is expected, then the file is processed by the deserializer without complaint. However, invalid data is created in the database, causing issues later on, when retrieving the data. Instead, the file should be rejected with an error message.
We need to throw a user exception in the serializer in this place. It should be similar to the opposite case, when an aggregation is detected, but simple value expected.
Here are two test files:
- Simple reference instead of aggregation: bs-1269-1.ifc.txt
- Aggregation instead of simple reference: bs-1269-2.ifc.txt