Ed,Whenever you get some time, pl. take a look at this issue. My earlier email is forwarded herewith. Of late, I've been retrying to work on the code reg. M:M relationship. (ref. traceback saying that "column wrmstid can not be null") To clear the confusion, if any, let me reiterate that 2 related tables ARE already populated. Then I attempted to insert a record in the intermediate table (glue table) - 'mdlwr' (with pkids of existing records).
The error is encountered while inserting a record in the intermediate table (glue table) - 'mdlwr'. (NOT while inserting record in individual tables - 'wrmst' or 'mdlmst' by dabo). Any pointer on this issue? Thanks, Vineet ----- Forwarded Message ----- From: Vineet Deodhar <d_vin...@yahoo.com> To: Ed Leafe <e...@leafe.com>; "dabo-users@leafe.com" <dabo-users@leafe.com> Sent: Monday, 3 October 2011, 15:16 Subject: Getting near to the problem identification (ref. M:M issue) Reg. M:M assoc., I think I figured out the problem area. It is not failing while trying to insert records in individual tables. These tables are already populated. The query exception is raised while select/insert into the 'mdlwr' glue table. "otherPK" is NOT set to the supplied argument. "mdlBizObj.mmAddToBoth(wrBizObj,"mdlmstid", '1', "wrmstid", '1')" It is set to default "None" value. In def mmAddToBoth(), print line is embedded as --- ======================== aux = self.AuxCursor sql = self._qMarkToParamPlaceholder("select * from %s where %s = ? and %s = ?" % (self._assocTable, self._assocPKColThis, self._assocPKColOther)) print "mmAddToBoth() SQL: %s, PARAMS: %s" % ( sql.decode(self.Encoding).replace("\n", " "), str((thisPK, otherPK))) sql.decode(self.Encoding).replace("\n", " "), str((thisPK, otherPK))) ======================== Output is--- mmAddToBoth() SQL: select * from mdlwr where mdlmstid = %s and wrmstid = %s, PARAMS: (1, None) SQL PARAMS select * from mdlwr where mdlmstid = %s and wrmstid = %s (1, None) SQL PARAMS insert into mdlwr (mdlmstid, wrmstid) values (%s, %s) (1, None) SQL PARAMS ROLLBACK None DBQueryException: (1048, "Column 'wrmstid' cannot be null") Any idea on how to solve this? Thanks, Vineet. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: Dabo-users@leafe.com 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/1317973983.25513.yahoomail...@web160514.mail.bf1.yahoo.com