You would have to create a custom Type object for your Country class. However, I don't see any way that you could then return the partners when you want them. If you're willing to always force a second transaction to get the partners for a country, it's then easy enough. To learn to make a custom mapping you'll want to read the source of the unit tests.
On Mon, Sep 7, 2009 at 8:05 AM, homer84 <[email protected]> wrote: > > Hi there, > I implemented a service whose method getCountries() retrieves a list of > countries from the database using hibernate. > The countries also have many partners, but I use lazy loading to improve my > application performance. > > With cxf I publish the method getCountries() so that I can call it from a > client (for test purposes I'm using soapUI). > > cxf uses aegis and when I call getCountries hibernate returns a collection > of countries (partners are not retrieved yet), but on the client side I see > all the partners because aegis accesses the partners collection (asking > hibernate to load them)! > > how do I avoid it? > I really need to find a way to control what has to be marshalled for a > given > method! > > like in: getCountries() I only need the list without the parnters > by sometimes (like in getCountry() I want to see its partners too... > > help! > -- > View this message in context: > http://www.nabble.com/take-control-over-aegis-marshalling-tp25329451p25329451.html > Sent from the cxf-user mailing list archive at Nabble.com. > >
