Open adamvy-google opened 7 years ago
The current flow has MDAO initialize its id index on creation ('of' is a required property), so it could be validated as soon as you try and create the MDAO.
Otherwise changing the init to be lazier could be an option.
Also I agree it's a general DAO requirement, since any DAO doing id comparisons should be using the efficient ID.compare() provided by IDSupport, so having a real ID property is required (rather than trying to cheat by assuming any 'obj.id' is good enough).
Instead I get null pointer exceptions from MDAO when it tries to convert the ID property to an index.
Not sure where the correct place is to put this validation, maybe the ClassProperty for all DAO.of should validate that OF has IDSupport of some sort.