Skip Menu |
 

This queue is for tickets about the Tangram CPAN distribution.

Report information
The Basics
Id: 4279
Status: new
Priority: 0/
Queue: Tangram

People
Owner: Nobody in particular
Requestors: sam [...] vilain.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Return-Path: <sv [...] dev.surreytech.co.uk>
Delivered-To: cpan-bug+tangram [...] pallas.eruditorum.org
Received: from betelgeuse.stc.surreytech.co.uk (stc.surreytech.co.uk [81.3.107.58]) by pallas.eruditorum.org (Postfix) with ESMTP id 19D37111B4 for <bug-Tangram [...] rt.cpan.org>; Mon, 3 Nov 2003 10:59:17 -0500 (EST)
Received: from sv by betelgeuse.stc.surreytech.co.uk with local (Exim 3.35 #1 (Debian)) id 1AGh6K-0003bD-00; Mon, 03 Nov 2003 15:58:44 +0000
From: Sam Vilain <sam [...] vilain.net>
To: tangram-t2-maintainers [...] hottub.perlfect.com, "Konopnicki, David" <david.konopnicki [...] hp.com>, <tangram-users [...] lists.sourceforge.net>
Subject: Re: [tangram-t2-maintainers] Inheritance in queries
Date: Mon, 3 Nov 2003 15:58:44 +0000
User-Agent: KMail/1.5.2
References: <711B92DC11556E428989346ECC5D9E0C028350DA [...] raaexc01.emea.cpqcorp.net>
In-Reply-To: <711B92DC11556E428989346ECC5D9E0C028350DA [...] raaexc01.emea.cpqcorp.net>
CC: bug-Tangram [...] rt.cpan.org
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200311031558.44253.sam [...] vilain.net>
Sender: Sam Vilain <sv [...] dev.surreytech.co.uk>
X-RT-Original-Encoding: iso-8859-1
Content-Length: 2358
Download (untitled) / with headers
text/plain 2.3k
Right. In which case, you should explicitly tell Tangram where not to create the table: ...Tangram::Schema->new({ classes => [ Foo => { bases => [qw(Bar)], table => "Bar", }, Bar => { # ... }, ] }); There's still a bug of course, but the workaround exists in this case. What to do with one that doesn't contain any attributes at all at the top of the heirarchy is another problem :-). Thanks, Sam. On Sun, 02 Nov 2003 13:26, Konopnicki, David wrote; Show quoted text
> I fixed it myself but the solution may interrest other people. > The problem is that one of the classes in my hierarchy has no fields
only associations. When this is the case, Tangram does not create a table for this class. This breaks a lot of things when writing queries. In particular, I think it breaks the code that associate a field in an object with a column in one of the table to which the object is mapped. Show quoted text
> > Hope it helps. > -David > > -----Original Message----- > From: Konopnicki, David > Sent: Sunday, November 02, 2003 11:25 AM > To: Tangram (E-mail); tangram-users@lists.sourceforge.net > Subject: [tangram-t2-maintainers] Inheritance in queries > > > Hi, > I have problems with inheritance in queries. I have four classes
inheriting from each other A->B->C->D (D is the top of the hierarchy). Show quoted text
> I do: > $r = $storage->remote(A); > @o = $storage->select($r, A->{toto} eq 'z'); > > where toto is in fact an attribute that is defined in class C. > The SQL generated looks like: > Select .... > from A, B, C, D where > A.id = B.id and A.id = C.id and A.id = D.id and B.toto = 'z'; > which fails because toto is found in table C and not B. > Any ideas? > Thanks. > -David > _______________________________________________ > tangram-t2-maintainers mailing list > tangram-t2-maintainers@hottub.perlfect.com > http://hottub.perlfect.com/mailman/listinfo/tangram-t2-maintainers > _______________________________________________ > tangram-t2-maintainers mailing list > tangram-t2-maintainers@hottub.perlfect.com > http://hottub.perlfect.com/mailman/listinfo/tangram-t2-maintainers > >
-- Sam Vilain, sam@vilain.net He hasn't one redeeming vice. OSCAR WILDE


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.