[Ext] Re: [xsd-users] Issues with operator==

Boris Kolpackov boris at codesynthesis.com
Thu Aug 6 05:14:41 EDT 2026


Nicolas Weidmann <n.weidmann at lombardodier.com> writes:

> It's not a lib issue...
> 
> It's another polymorphic issue when a XSD is included into another.
> 
> Whenever I create a transaction with an order of type Fidget,
> transaction.getValeu() == transaction.getValeu() is OK
> 
> But if my transaction holds a SubFidget instead, the same comparison
> results in the exception.

Unlike element types, comparison is polymorphism-aware. The exception
you are getting indicates that no dynamic type-specific comparison
function was registered for this type. This normally has two causes:

1. You didn't compile your schema with --generate-polymorphic. This seems
   unlikely since parsing/serialization work as expected.

2. The registartion code was not executed. This is often happens with
   static libraries if the object file in question did not end up being
   linked in (which is a peculiar semantics of static libraries).

Can you try to step into operator==() that throws with a debugger and
see what happens there? You can also try to find the registartion code
for the type in question and set a breakpoint there to see if it gets
executed.



More information about the xsd-users mailing list