-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Component mapping. Bug or feature?
PostPosted: Wed Jun 01, 2005 11:59 am 
I have shopping cart component in Customer class:

Code:
            <component name="ShoppingCart">
                <many-to-one name="Customer" column="CustomerID"/>
                <bag name="Items" table="ShoppingCart" access="field.camelcase" cascade="all">
                    <key column="CustomerID"/>
                    <composite-element class="DomainModel.CartItem, DomainModel">
                        <property name="Quantity" column="Quantity" type="Int32"/>
                        <many-to-one name="Product" column="ProductID"/>
                    </composite-element>
                </bag>
            </component>


When I trying to update customer NH throws ADOException with inner SqlException: "Column name 'CustomerID' appears more than once in the result column list.".

If I comment "<many-to-one name="Customer" column="CustomerID"/>" line all updates works and after update I can uncomment it and works with bidirectional association fine.

Is it bug or feature? I think if I can retrieve data with this mapping it must work with update/insert too.


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.