You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Peter_Levin <pe...@gmail.com> on 2008/05/12 19:28:30 UTC

Object AS references

AS I found (may be wrong) iBatis treat objects and so instantiate them as
Value-object.(not refference)
So how can I load tree. for example:

class Some
{
       string ID {get{...};set{...};}           
       Some Parent {get{...};set{...};}           
}

I dont want Mapper or who is ressponsible for this create new Instance of
object for Parrent but it should use
the instance allready created while loading.
And so on. A lot of cases when I need refference, but not value.
Who have some sugestions - wellcome - I would say "GREAT THANKS, AMIGO"  :-)
-- 
View this message in context: http://www.nabble.com/Object-AS-references-tp17189888p17189888.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


Re: Object AS references

Posted by Clinton Begin <cl...@gmail.com>.
My apologies.  I didn't realize this was the CS list (my bad for merging my
filter a little while ago)....

My comments about 3.0 and 2 stage caching was only applicable to the Java
version at this time.  But I believe my comments about the current version
still stand (Gilles will correct me if it's wrong).

Cheers,
Clinton

On Mon, May 12, 2008 at 11:39 AM, Clinton Begin <cl...@gmail.com>
wrote:

> Yes, this is the current behavior and will continue to be for Version
> 2.  You can however imitate the behavior you want by enabling a cache
> for that statement.
>
> Version 3.0 has a 2 stage cache which will do this automatically, but
> for now, that's the best you can do.
>
> Clinton
>
> On Mon, May 12, 2008 at 11:28 AM, Peter_Levin <pe...@gmail.com>
> wrote:
> >
> >  AS I found (may be wrong) iBatis treat objects and so instantiate them
> as
> >  Value-object.(not refference)
> >  So how can I load tree. for example:
> >
> >  class Some
> >  {
> >        string ID {get{...};set{...};}
> >        Some Parent {get{...};set{...};}
> >  }
> >
> >  I dont want Mapper or who is ressponsible for this create new Instance
> of
> >  object for Parrent but it should use
> >  the instance allready created while loading.
> >  And so on. A lot of cases when I need refference, but not value.
> >  Who have some sugestions - wellcome - I would say "GREAT THANKS, AMIGO"
>  :-)
> >  --
> >  View this message in context:
> http://www.nabble.com/Object-AS-references-tp17189888p17189888.html
> >  Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
> >
> >
>

Re: Object AS references

Posted by Clinton Begin <cl...@gmail.com>.
Yes, this is the current behavior and will continue to be for Version
2.  You can however imitate the behavior you want by enabling a cache
for that statement.

Version 3.0 has a 2 stage cache which will do this automatically, but
for now, that's the best you can do.

Clinton

On Mon, May 12, 2008 at 11:28 AM, Peter_Levin <pe...@gmail.com> wrote:
>
>  AS I found (may be wrong) iBatis treat objects and so instantiate them as
>  Value-object.(not refference)
>  So how can I load tree. for example:
>
>  class Some
>  {
>        string ID {get{...};set{...};}
>        Some Parent {get{...};set{...};}
>  }
>
>  I dont want Mapper or who is ressponsible for this create new Instance of
>  object for Parrent but it should use
>  the instance allready created while loading.
>  And so on. A lot of cases when I need refference, but not value.
>  Who have some sugestions - wellcome - I would say "GREAT THANKS, AMIGO"  :-)
>  --
>  View this message in context: http://www.nabble.com/Object-AS-references-tp17189888p17189888.html
>  Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
>
>