Hi Etienne,

Thanks for your message.

Unfortunately, I'm not aware of any XJC plugins that implement equals() and
hashCode() correctly without any external dependencies. But you can easily
check for equality by serialising both Configuration objects to an XML
string using

boolean equal(Configuration c1, Configuration c2) {
  try {
    StringWriter w1 = new StringWriter();
    StringWriter w2 = new StringWriter();
    JAXB.marshal(c1, w1);
    JAXB.marshal(c2, w2);
    return w1.toString().equals(w2.toString());
  }
  catch (IOException ignore) {}
  return false;
}


I hope this helps,
Lukas

2018-01-16 17:19 GMT+01:00 <[email protected]>:

> Hi Lukas
>
> Would it be possible for you to generate the JAXB classes (Configuration,
> Jdbc, Generator, etc.) with an equals and hash code implementation? Not
> sure if the JAXB code generators provide such an option. It would allow the
> gradle-jooq-plugin to determine if the Configuration has changed between
> two runs.
>
> Etienne
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to