Hi!
I'm using detached hibernate pojos and Axis2 for exposing some data to webservices. I can't use Bidirectional mapping because when I serialize to Axis2 the xml goes in an eternal loop.
ex.
Customer Class with MarketToLanguage set
MarketToLanguage with reference to customer class
This ends up with an eternal loop when I try to serialize it to Axis. See
this topic for more information
I have solved it by not using bidirectional mapping .
ex
I have a Customer, Market, And Language class, They are mapped together by A MarketToLanguage class.
Language and Markets looks pretty much the same. Here is the MarketToLanguage class
the mapping maps many-to-one in MarketToLanguage.hbm.xml for Language, Customer and Market.
I have done this so that I wont serialize the whole object graphs when exposing it as webservice. There are of course several other classes in this but I think you get the id�
First question: Any help on a better way of implementing Hibernate and Axis2?
Second question: When I delete a Customer I want all the MarketToLanguage that has that Customer to be deleted. I can't get this to work because there isn't any Set to add on-delete for in the Customer class since the Customer is unaware of the MarketToLanguage
How can I delete MarketToLanguages when I delete a Customer?
Hope you know what I meen
[ September 23, 2007: Message edited by: Mathias Nilsson ]