Another good feature would be the ability to ignore certain fields when loading data into the entity. My use case is that in the unit tests, I need to insert into the table test data and there are fields that are not nullable that I don't need when retrieving data for the production code... Maybe an extra parameter in the KomapperColumn annotation
forWritingOnly
(naming could be different...)?
dave08
10/10/2023, 7:37 AM
To manage two copies of the same entity for read/write wouldn't be too nice, since there's more chance for error unless the entity checking feature would exist...
dave08
10/10/2023, 7:39 AM
Of course, these fields would have a default value so that they can be loaded without effecting the readable ones.
dave08
10/10/2023, 7:40 AM
(Or maybe instead of adding this to
@KomapperColumn
, it could be added to
@KomapperIgnore
which would probably be much cleaner...)
dave08
10/10/2023, 7:41 AM
like
@KomapperIgnore(ignoreForReading=true)
t
Toshihiro Nakamura
10/10/2023, 10:08 AM
Your use case appears to be specific and may not be a good fit for inclusion in Komapper. Perhaps you could develop a tool to handle your own annotations?