users@jaxb.java.net

Hyperjaxb3 association customization

From: steffend <sdienst_at_informatik.uni-leipzig.de>
Date: Tue, 19 Jan 2010 06:51:23 -0800 (PST)

Hi everybody,

I'm stuck trying to customize a one-to-many association. I'd like to reduce
the cascadetype from 'all' to just all-'delete'. I'm using maven with the
hyperjaxb3 plugin, version 0.5.4.


Schema snippet:
...
<xs:complexType name="Category">
  <xs:choice maxOccurs="unbounded">
    <xs:element name="element1" type="...">
    <xs:element name="element2" type="...">
    <xs:element name="element3" type="...">
  </xs:choice>
</xs:complexType>
...

My external customization is:
...
<jxb:bindings node="//xs:complexType[@name='Category']/xs:choice">
   <hj:one-to-many>
      <orm:join-column />
      <orm:cascade>
         <orm:cascade-persist />
         <orm:cascade-refresh />
         <orm:cascade-merge />
     </orm:cascade>
  </hj:one-to-many>
</jxb:bindings>
...

All I'm getting is this error message: "com.sun.istack.SAXParseException2:
compiler was unable to honor this hj:one-to-many customization. It is
attached to a wrong place, or its inconsistent with other bindings."

Could anybody please point to my hopefully blatant error?

Thanks,

Steffen

-- 
View this message in context: http://old.nabble.com/Hyperjaxb3-association-customization-tp27226986p27226986.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.