oatpp-postgresql icon indicating copy to clipboard operation
oatpp-postgresql copied to clipboard

[BUG]Cannot serialize empty containers.

Open EnderTheCoder opened this issue 1 year ago • 1 comments

I was using oatpp-postgresql to insert contrainers(mainly UnorderedSet<Int32>) into a table as a field and my program reported this: image This error shows that oatpp-postgresql cannot serialize a common UnderedSet<> object. After diving into the source code I found that this module was using the first element from the containter to get type info of it. When trying to insert an empty container into the db, it will throw an error tells that cannot get type oid of Void type. cause Any empty container serialization could break the QUERY() execution.

EnderTheCoder avatar Dec 06 '24 02:12 EnderTheCoder

Well, I dont see any way can fix this quickly. Maybe add a more specific and helpful error msg tells that this is not implemented would be better? The current error msg is kinda confusing.

EnderTheCoder avatar Dec 06 '24 03:12 EnderTheCoder