----- "Paul McNett" <[email protected]> wrote: > Adrian Klaver wrote: > > Seem you have to explicitly add the fields. I thought setting > DataStructure took > > care of that? > > The *only* function of setting DataStructure is to tell Dabo which > fields are of > which type, which is the primary key, and which fields come from what > tables. By > setting DataStructure, you are explicitly telling Dabo this > information and Dabo will > rely on that instead of trying to get the information from the backend > database. > > When you don't set DataStructure explicitly, querying DataStructure > results in > information gotten by querying the backend database. > > In my base bizobj, I've added a addFieldsFromDataStructure() function > that calls > addFields() for each field listed in the explicitly-set DataStructure, > which results > in less redundancy. > > Paul
Thanks for the clarification. Any chance addFieldsFromDataStructure() will make it into the general code? If not I will code something up here. In trying to answer my question I did some digging around in the source code and docs, and trying things.I will summarize what I think I found to see if I am getting things right. Invoking UserSQL overrides the SQL Builder methods in dCursorMixin.py. This means you lose any parent-child relationship information set in a bizobj As noted DataStructure lives outside the SQL Builder A dataset starts out as tuple of dictionaries. When getDataSet() is called you get a sqlite3 table that can be used in queries by using the alias "dataset". Doing bizobj.filter() sets up a sqlite3 dataset. sqlite3 does not understand timestamps with time zones. This is what initially led to all this. I tried to bizobj.filter() and the dataset choked on a timestamp field I did not think I had included in my bizobj. This a is an issue with sqlite/pysqlite they will INSERT a string with a time zone offset but will error on retrieving it. Now that I understand DataStructure, it is not problem. Something to deal with at another time. Adrian Klaver [email protected] _______________________________________________ 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/1707451813.7265121236789043843.javamail.r...@sz0030a.emeryville.ca.mail.comcast.net
