https://kotlinlang.org logo
#komapper
Title
# komapper
d

dave08

12/26/2022, 2:10 PM
Can a field in an Entity be private? I need to guard access to the real db value, and replace it with a virtual property that does a bit more...
t

Toshihiro Nakamura

12/26/2022, 2:27 PM
No, it cannot. Komapper must access the entity fields without reflection.
d

dave08

12/26/2022, 3:29 PM
Even though it could set them in the constructor? Anyways the main thing being accessed is the Meta class generated, no?
t

Toshihiro Nakamura

12/26/2022, 11:16 PM
Instantiation of entity classes, copying, and access to fields are all done within the generated metamodel class.
5 Views