Re: Master/Detail queries

James Thompson <[email protected]>
Newsgroups gmane.comp.gnu.enterprise.general
Message-ID <[email protected]>
> I can only perform queries on customer_id's, otherwise I get such a HUGE
> Error message that I could spend half a day reading through it. Now, in an
> Ordertable one would like to select the Ordernumber, and then bring up the
> customer_id (which would be the reference to link together the tables).

So you're trying to query a form from one of it's detail blocks.  This is only 
possible on backends that support subqueries.  It's my understanding that  
MySQL prior to 4.1 doesn't support subqueries.  This may be the cause of your 
error.  It's hard to say without a better idea what the error states.

> It's too early, maybe I'm jabbering, and the more I think about it, this
> seem to be a question about database design, I suppose a GNUe-form could
> have several master/detail relations?

Yes.  You can have several master/detail relations.  And details can be 
masters for other details.  These nest as deep as you like.  A master can 
have as many detail blocks attached as you wish.  It should even be possible 
to split master/detail tables across backends so that the master is in a 
mysql db and the detail is in a postgresql db.  But I haven't tested that 
functionality in ages.

Take Care,
James
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.