During Marshalling the method should be called only once. During
unmarshalling it will be called multiple times. To avoid multiple calls
during unmarshalling, use an 'add' method.

If the get-method is being called more than once during marshalling
(Object->XML) then most likely there is a bug. I'll try to reproduce the
problem here, but I won't be using a database. I'll just build a simple
collection dynamically in the 'get' method.

--Keith

"Russell, Mike" wrote:
> 
> Also important, I'm dynamically building this file.  Anything that can be a
> top level object implements  the container interface which is nothing but
> getCollection();
> 
> This is so can I dynamically change from one client request to another what
> class is specified in the type field and what is bound to the bind-xml
> field. The field name=container never changes.  So airports, gates,
> securities all implement this interface if the user sends in a request for
> these as the top level query
> 
> -----Original Message-----
> From: Russell, Mike [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 02, 2002 8:49 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] multiple calls to getMethod during marshalli
> ng
> 
> My object model is fairly simple.  It consists of airports, gates at at the
> airport, owners of the aiport and security at the gate. I've attached my
> mapping file
> 
> However, in the get methods of the objects I'm populating them via jdbc
> calls to the database.  So when castor calls airport.getGates() I run a
> query. I am not using JDO. I constructing a query.
> 
> -----Original Message-----
> From: Keith Visco [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 02, 2002 5:39 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] multiple calls to getMethod during marshalling
> 
> What does your mapping file and object model look like?
> 
> --Keith
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to