I have some legacy tables with id=0 that I can't change.
Using IdUnsavedValue solved error messages, but now I noticed that using XData and navigating to the plain entity exposed endpoint, the list does not show id=0 element ( http://myservice/EntityName/ starts from id=1 element ).
If I navigate directly to http://myservice//EntityName(0) , it shows the record.