KeyValueTemplate
assumes a map only and tries to assign ID [DATAKV-127]
#106
Labels
type: bug
A general bug
Wallace Wadge opened DATAKV-127 and commented
Apologies for the length of this post but before I explain my issue, a little discussion is in order (I think this would be a great example project actually). I like Spring Data Rest, but I don't want to expose my DB objects as my api to allow me to modify my DB without affecting my api. My DB code also lives in a separate isolated module.
I have 2 modules, a web front-end and a core; so for eg I have a Client class for my DB and ApiClient for my api. Now Spring Data KeyValue allows me to treat a map as a repository -- Great! So on web module I define my repositories + API entities and on backend I have completely different repositories, and because I have a common interface my backend mapping code is very simple, for eg:
I even map querydsl predicates between the two worlds which is very nice too, everything based on my single Api->DB model mapper (orika in my case).
Now for the problem:
KeyValueTemplate assumes I will always need to generate an ID to store in some map so IdentifierGenerator is hard-coded to DefaultIdentifierGenerator.INSTANCE; but in my case I want to send null to the other side because it will be filled later on by the db layer. Can you please:
No further details from DATAKV-127
The text was updated successfully, but these errors were encountered: