It's times like this I wish there was something like an ExtraRelatedJoin.. think of it procedurally though and believe in yourself :)

all = GoodsPurchasing.select()
for i in all:
    print "Goods: %" %i.goods.name
    print "Date: %" %i.purchasing.date
    print "Supplier: %" %i.purchasing.supplier
    print "Amount: %" %i.amount
    print

On 1/2/06, Mico Siahaan <mico.siahaan@gmail.com> wrote:
Dear all,

I have model like this:

class Goods(SQLObject):
    name = StringCol()
    inStock = IntCol(default=0)
    goodspurchasing = MultipleJoin('GoodsPurchasing')

class Purchasing(SQLObject):
    date = DateCol()
    supplier = StringCol()
    goodspurchasing = MultipleJoin('GoodsPurchasing')

class GoodsPurchasing(SQLObject):
    purchasing = ForeignKey('Purchasing')
    goods = ForeignKey('Barang')
    amount = IntCol(default=0)

I want to make report of how many goods are puchasing each month like this:

Goods:
Date:
Supplier:
Amount:

what shall the code be?

Thanks.

--
Mico Siahaan
---
Mobile: +62-8121025010
Email: Mico.Siahaan@gmail.com
Blog: www.tentangmico.info


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss