Now that John has helped me past the Postgres sequence problem,
I can report on my problems with new(). Below is cut and paste from
my attempts with comments-

bz=self.getBizobj()
self.new()
bz.getRecordStatus()
bz.SaveNewUnchanged
bz.getRecordStatus()
bz.save()
#Ignore my capitalization problems
self.Season.value()
self.Season.value
self.Season.Value
bz.getRecordStatus()
bz.save()

{}
True
# Entered 'test' into common field. Plant_type,category_type,category_sub_test
# had values filled from database default values.  Selecting the 
self.RegID.Value
# showed the correct value.  SaveNewUnchanged set to True. 
self.getRecordStatus()
# showed-
{'common': (u'', u'test')}
# Running bz.save() resulted in-
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File 
"/usr/lib/python2.5/site-packages/Dabo-0.8.3-py2.5.egg/dabo/biz/dBizobj.py", 
line 394, in save
    raise dException.DBQueryException, e
DBQueryException: insert or update on table "plant1" violates foreign key 
constraint "plant1_category_fkey"
DETAIL:  Key (category_type,category_sub_type)=(,) is not present in table 
"plant1_category".
# The default values where not picked up by the save()-
SQL: insert into "public"."plant1" ("plant_type", "variety", "color", "season", 
"category_sub_type", "category_type", "common", "series", "genus", "species") 
values ('', '', '', '', '', '', 'test', '', '', '') 
# Ignore
Traceback (most recent call last):
  File "<input>", line 1, in <module>
AttributeError: 'dDropdownList' object has no attribute 'value'
Traceback (most recent call last):
  File "<input>", line 1, in <module>
AttributeError: 'dDropdownList' object has no attribute 'value'
# self.Season.Value()
u'annual'
# I selected items in Dropdown Lists. This seems to have registered them as 
changed.
# self.getRecordStatus()-
{'plant_type': (u'', u'flower'), 'season': (u'', u'perennial'), 
'category_type': (u'', u'asst'), 'category_sub_type': (u'', u'none'), 'common': 
(u'', u'test')}
# bz.save() is successful. This is just a print statement that I inserted while 
testing the
# new Postgres sequence code.
[('plant1_p_item_no_seq',)]


--
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/dabo-users/[EMAIL PROTECTED]

Reply via email to