Ed Leafe <[EMAIL PROTECTED]> writes:
>
>
>
> biz = self.getBizobj("your_bizobj_name")
> print biz.getDataSet()[0].keys()
>
> Change "your_bizobj_name" to the DataSource of the bizobj in question.
>
It appears that the problem is that the fields defined by the join in UserSQL
are not added to the dataset. Using SQL Builder, they are added to the dataset.
Fields from the joined table, InfoPT ,with or without an alias, are not added
to the dataset by UserSQL.
for UserSQL:
testsql = """Select FotoInf.count0, FotoInf.recordID_fk, FotoInf.FInfoID_fk,
InfoPT.photoType as phType
From FotoInf inner join InfoPT on FotoInf.FInfoID_fk = InfoPT.InfoID"""
fotoinfBizobj.UserSQL= testsql
output from: biz = self.getBizobj("FotoInf")
print biz.getDataSet() [0].keys() is:
['count0', 'FInfoID_fk', 'recordID_fk']
for UserSQL(with the alias reference removed):
testsql = """Select FotoInf.count0, FotoInf.recordID_fk, FotoInf.FInfoID_fk,
InfoPT.photoType From FotoInf inner join InfoPT on
FotoInf.FInfoID_fk = InfoPT.InfoID"""
self.UserSQL= testsql
output from: biz = self.getBizobj("FotoInf")
print biz.getDataSet() [0].keys() is:
['count0', 'FInfoID_fk', 'recordID_fk']
for SQL Builder:
self.DataSource = "FotoInf"
self.KeyField = "count0"
self.LinkField = "recordID_fk"
self.addFrom("FotoInf")
self.addField("recordID_fk")
self.addField("FInfoID_fk")
self.addField("count0")
self.addJoin("InfoPT", "FotoInf.FInfoID_fk=
InfoPT.InfoID")
self.addField("InfoPT.photoType as phType")
output from: biz = self.getBizobj("FotoInf")
print biz.getDataSet() [0].keys() is:
['recordID_fk', 'FInfoID_fk', 'phType', 'count0']
dwarder
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]