Invalid key error when merging to targets due to trailing spaces
Some databases like MySQL and SQL Server ignore trailing spaces when comparing strings (see this post on SO, for example). This leads to matched targets being different from sources, and consequently to an exception in com.nhl.link.move.runtime.task.createorupdate.CreateOrUpdateMerger#merge.
Example: Source key: {foo='bar'} Matched target (was selected by WHERE foo = 'bar'): {foo='bar '} Note the sneaky trailing space.
I'm not sure if it's an "issue" at all, but still willing to share.
Yeah, as a Cayenne developer, I am very familiar with the issue (see for instance https://github.com/apache/cayenne/blob/master/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/TrimmingQualifierTranslator.java ). We will probably need to write tests with cross-DB sources at some point to see the behavior.