Use Attribute interface

| Q                    | A
| -------------------- | ---
| Bug fix?             | N
| New feature?         | N
| BC breaks?           | Y
| CI currently passes? | Almost
| Tests pass?          | Y
| Scenarios pass?      | ORM: 1328, ODM: 241
| Checkstyle issues?*  | N
| PMD issues?**        | N
| Changelog updated?   | N
| Fixed tickets        | No
| DB schema updated?   | N
| Migration script?    | N
| Doc PR               |