perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject Re: DBIx::Recordset - detecting table linkages
Date Sun, 12 Oct 2003 20:54:07 GMT
At 4:45 AM -0700 10/11/03, Terrence Brannon wrote:
>>From 
>http://search.cpan.org/~grichter/DBIx-Recordset-0.24/Recordset.pm#Automatic_detection_of_links
>
>We have::
>
>DBIx::Recordset and DBIx::Database will try to automatically detect 
>links between tables based on the field and table names. For this 
>feature to work, the field which points to another table must 
>consist of the table name and the field name of the destination 
>joined together with an underscore (as in the above example 
>name.street_id). Then it will automatically recognized as a pointer 
>to street.id.
>
>My comments:
>
>Table linkage detection is a useful feature. However, whenever we 
>must use SQL, the easiest way to join two tables is via a NATURAL 
>join, in which case,

Does recordset use that information for joins?  I've only ever used 
it to do a new query.  E.g.

	$set2 = $$set->{-otherrecord}

One thing that would be helpful in that context is to have the 
inverse case automatically generated, eg.
	$set = $$set2->{-otherrecords}
Although for language reasons, automatically doing plurals probably 
isn't a good idea, maybe something like:
	$set = $$set2->{'+otherrecords'}

-- 
Kee Hinckley
http://www.messagefire.com/         Next Generation Spam Defense
http://commons.somewhere.com/buzz/  Writings on Technology and Society

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message