Skip to content

Importance of properties is ignored

Doing the following on an empty CaosDB instance doesn't even throw a warning.

Create a RecordType Person with obligatory property lastname, e.g., by inserting

Person:
  obligatory_properties:
    last_name:
      datatype: TEXT

and then insert a Person Record without any properties, e.g., by

import caosdb as db
person_rt = db.RecordType(name="Person").retrieve()
person = db.Record(name="TestPerson").add_parent(person_rt)
person.insert()

Since the property lastname is obligatory, I would expect the server to raise an error, but the insertion doesn't even throw a warning (except for the general one about the Entity not having properties at all, of course, but this is not the point).

Edited by Florian Spreckelsen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information