You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Niels Beekman <ni...@wis.nl> on 2005/06/15 13:59:29 UTC
Possibilities and/or impossibilities of subclassing
Hi,
Could you guys please clarify some of the possibilities and
unpossibilities of iBATIS when it comes to subclassing?. What I
understand from the various documentation-fragments is that iBATIS only
supports discriminators when all columns are available in a single
resultset. How would this work when I have an ISA-design with let's say
10 different subtables, this would result in enormous amounts of data...
Is there any documentation that I have missed somehow? I saw it on the
undocumented features-list, but maybe there is some after all. I looked
at the provided Documentation.xml but this is an example with just one
table, which is not I'm looking for. I even checked the .NET
documentation too, the discriminator is mentioned there, but not in the
context of subtables (and I heard that iBATIS.NET has more features when
it comes to subclassing).
I hope you can shed some light on this, otherwise it requires some
workarounds on my end.
Thanks for your time,
Niels
PS I tried to contact Ron for his solution
(http://www.mail-archive.com/ibatis-dev%40incubator.apache.org/msg01014.
html) to this problem, as he said he was helped "off list" but could not
reach him.
Re: Possibilities and/or impossibilities of subclassing
Posted by Ron Grabowski <ro...@yahoo.com>.
The next message in the thread had a list of three cases where the
discriminator might come in handy:
* table per class hierarchy
* table per subclass
* table per concrete class
That's the answer I was looking for. I believe both the .Net and Java
version now have the same level of suppor for discriminators. Although
I did noticed that the Java version specifies them like this:
<discriminator>
<submap />
<submap />
<submap />
</discriminator>
While the .Net version does it like this:
<discriminator />
<submap />
<submap />
<submap />
Which leads me to believe the .Net version only allows for one
discriminator per resultMap ??? That's what I remember seeing at some
point.
--- Niels Beekman <ni...@wis.nl> wrote:
> Hi,
>
> Could you guys please clarify some of the possibilities and
> unpossibilities of iBATIS when it comes to subclassing?. What I
> understand from the various documentation-fragments is that iBATIS
> only
> supports discriminators when all columns are available in a single
> resultset. How would this work when I have an ISA-design with let's
> say
> 10 different subtables, this would result in enormous amounts of
> data...
>
> Is there any documentation that I have missed somehow? I saw it on
> the
> undocumented features-list, but maybe there is some after all. I
> looked
> at the provided Documentation.xml but this is an example with just
> one
> table, which is not I'm looking for. I even checked the .NET
> documentation too, the discriminator is mentioned there, but not in
> the
> context of subtables (and I heard that iBATIS.NET has more features
> when
> it comes to subclassing).
>
> I hope you can shed some light on this, otherwise it requires some
> workarounds on my end.
>
> Thanks for your time,
>
> Niels
>
> PS I tried to contact Ron for his solution
>
(http://www.mail-archive.com/ibatis-dev%40incubator.apache.org/msg01014.
> html) to this problem, as he said he was helped "off list" but could
> not
> reach him.
>