All, I am using the XML Binding functionality of Hibernate 3.0 and
need support for XML namespaces. I have added to support for a namespace
attribute in the mapping file so one may have a mapping file that looks like: <hibernate-mapping> <class
entity-name="SequenceNumber" table="sequencenumber"
node="SequenceNumber"
namespace="http://roughbros.com/manufacture"> <id
name="sequenceNumber" type="int"
node="@number"> <generator
class="assigned"/> </id> <property
name="description" node="@description"
type="string" column="description"/> <set
name="PartNumberPatterns" node="PartNumberPatterns" cascade="all,delete-orphan"
namespace="http://roughbros.com/manufacture">
<key column="sequenceNumber"/>
<one-to-many entity-name="PartNumberPattern"/> </set> </class> <class
entity-name="PartNumberPattern" table="seqnumberpartnumber"
node="PartNumberPattern"
namespace="http://roughbros.com/manufacture"> <id
name="seqNumPartNumID" type="int"
unsaved-value="0" node="@seqNumPartNumID"> <generator
class="identity"/> </id> <property
name="pattern" node="@pattern" type="string"
column="partNumberPattern"/> </class> </hibernate-mapping> Then the code was modified to create elements with
namespaces when a namespace has been specified. The problem is that I
have been unable to track down where the dom4J element is created for the <set>
element. When the code is built with all the changes that I see needing
to be made, the results are: <SequenceNumber
number="100" description="Steel Shop Production for
Shipment" xmlns="http://roughbros.com/manufacture">
<PartNumberPatterns xmlns="">
<PartNumberPattern seqNumPartNumID="1"
pattern="7.+"/>
<PartNumberPattern seqNumPartNumID="2"
pattern="S.+"/>
</PartNumberPatterns> </SequenceNumber> Note the <set> element PartNumberPatterns has no
namespace. Does someone know where the collection elements are created in
the code? Thanks, Steve |
- [Hibernate] (no subject) LAY Oro
- [Hibernate] (no subject) Sai Babu
- [Hibernate] (no subject) d...@mail.eqyn.ac.cn
- [Hibernate] (no subject) Stephane Zuckerman
- [Hibernate] (no subject) Debidatta Choudhury, Bangalore
- Re: [Hibernate] (no subject) Emmanuel Bernard
- [Hibernate] (no subject) Steve Wolke