Primary keys get special treatments in the default ObjEntity
s generated in the GUI. They are removed from the properties, and it seems the best way to get them would be via the .getObjectId().getIdSnapshot()
, as a Map<String, Object>
, and to set them with one of the ObjectId.of()
variants to create one.
I feel I'm missing something here -- why are the primary key column(s) not exposed like other columns? Is there a better way to get / set PKs? The Map<String, Object>
-way is much less convenient and less type-safe, than the cgen
ed getters and setters.
I'm talking about the default behavior of creating a ObjEntity
from a DbEntity
in the GUI. I found I could add the property mappings manually in the ObjEntity
editing window. But I feel it's me fighting the tool instead of letting it help me.