Ormlite nullreference on updateonly

Hi.
when using update only, Im getting null reference error.
All the predicate items have values or they are null, but they are not causing null reference.

BTW, can I make visual studio step into the source to try and find it myself?

Thanks

You’re misusing the API, UpdateOnly uses the assignment expression to identify which fields to update, i.e. you can’t just pass in the instance, the entire initializer expression needs to be in the UpdateOnly lambda expression.

I’ve given up on VS, Rider provides a much better experience all round, inc debugging.

Hi, thanks again for the fast reply.

  1. My first param is just the fields I want to update. isnt that ok? Must I pass the entire obect? I can swear that this exact think was working for me a while ago…

  2. I have lisence for rider… rider is not working good with docker-compose… impossible to debug. very poor support.

It’s not, please read the UpdateOnly docs you either need to pass the expression in or provide the explicit list of fields you want to update, the predicate lets you filter the update.