# Todo - add `update_update_builder` (returning multiple statements) - add `delete_update_builder` (returning multiple statements) - implement polymorphic class hierarchies - finish `database` (schema_repository) class (move add/drop from `session` to `schema`) - implement a flag class for enumerations __Proposal for polymorphic classes:__ object_ptr::as does the following checks; 1. The requested type has a super class 2. Super class has a discriminator column defined 3. Super class has a discriminator value defined 4. Discriminator value is mapped to the requested type If all checks succeed, the requested is fetched from the database. ```cpp schema.attach("payloads", make_polymorph("type")); schema.attach("id_list_payloads", {"IdPayload"}); schema.attach("id_payloads", {"IdListPayload"}); //schema.attach("id_list_payloads", make_polymorph_type("IdPayload")); //schema.attach("id_payloads", make_polymorph_type("IdListPayload")); object::object_ptr payload; auto result = payload.as(); if (result.is_ok()) { const auto& is_payload = result.value(); // Use requested type id_payload->id = 1; } payload.is_polymorphic(); payload.is_polymorphic_type(); ```