Hi guys -

I'm working on a hard-to-trace down AttributeError thrown when I try to objectstore.refresh() one of my central objects. I've created a trial test case, which sadly _does_not_fail_, but at least demonstrates my usage. I'm looking for angles to approach this problem from; sadly the object I'm trying to refresh isn't portable, nor does it lend itself towards simplification.

In short (and English), after updating one of my secondary instances that has a foreignkey relationship with my customer instance, I commit the objectstore (which happens successfully), and then refresh the customer. With full echoing turned on I see the update occur, and the select get issued for the refresh. It is immediately after the SELECT that the error occurs, at line 414 of attributes.py in reset_history.

I tried haphazardly throwing refresh(cust) calls at various places, but was only able to evoke the error by refreshing the object after the commit().

Any ideas?
--G

Attachment: refresh_check.py
Description: Binary data

Attachment: attribute_error_traceback.log
Description: Binary data

[2006-04-01 20:19:56,957] [engine]: 
CREATE TABLE infos(
        pk INTEGER NOT NULL PRIMARY KEY, 
        info TEXT
)


[2006-04-01 20:19:56,957] [engine]: None
[2006-04-01 20:19:56,957] [engine]: 
CREATE TABLE rels(
        pk INTEGER NOT NULL PRIMARY KEY, 
        info_fk_one INTEGER REFERENCES infos(pk), 
        rel_data TEXT
)


[2006-04-01 20:19:56,957] [engine]: None
[2006-04-01 20:19:56,957] [engine]: INSERT INTO infos (pk, info) VALUES (?, ?)
[2006-04-01 20:19:56,957] [engine]: [[1, 'pk_1_data'], [2, 'pk_2_data'], [3, 
'pk_3_data']]
[2006-04-01 20:19:56,957] [engine]: INSERT INTO rels (pk, info_fk_one, 
rel_data) VALUES (?, ?, ?)
[2006-04-01 20:19:56,957] [engine]: [[1, 1, '1-1'], [2, 2, '2-2'], [3, 3, 
'3-3'], [4, 2, '4-2'], [5, 3, '5-3'], [6, 2, '6-2'], [7, 3, '7-3']]


Begin Test


[2006-04-01 20:19:56,967] [engine]: SELECT infos.info AS infos_info, infos.pk 
AS infos_pk 
FROM infos 
WHERE infos.pk = ?
[2006-04-01 20:19:56,967] [engine]: [3]
[2006-04-01 20:19:56,967] [engine]: SELECT rels.rel_data AS rels_rel_data, 
rels.pk AS rels_pk, rels.info_fk_one AS rels_info_fk_one 
FROM rels 
WHERE rels.info_fk_one = ?
[2006-04-01 20:19:56,967] [engine]: [3]
[u'3-3', u'5-3', u'7-3']
Task dump:
 UOWTask(13145552) 'Information/infos/13082256'
  |
  |- Save dependencies
  |- UOWDependencyProcessor(13145584) 'info_one' attribute on saved 
Relationship's (UOWTask(13145104) 'Relationship/rels/13120400')
  |       |-UOWTaskElement(13145200): Relationship(13144336) (save)
  |
  |- Delete dependencies
  |- UOWDependencyProcessor(13145616) 'info_one' attribute on Relationship's to 
be deleted (UOWTask(13145104) 'Relationship/rels/13120400')
  |       |-(no objects)
  |
  |- Child tasks
  |- UOWTask(13145104) 'Relationship/rels/13120400'
  |   |
  |   |- Save elements
  |   |- Save: UOWTaskElement(13145200): Relationship(13144336) (save)
  |   |----
  | 
  |----


[2006-04-01 20:19:56,967] [engine]: UPDATE rels SET info_fk_one=? WHERE rels.pk 
= ?
[2006-04-01 20:19:56,967] [engine]: [[None, 3]]

Execute complete (no post-exec changes)

[2006-04-01 20:19:56,967] [engine]: SELECT infos.info AS infos_info, infos.pk 
AS infos_pk 
FROM infos 
WHERE infos.pk = ?
[2006-04-01 20:19:56,967] [engine]: [3]
[2006-04-01 20:19:56,967] [engine]: SELECT rels.rel_data AS rels_rel_data, 
rels.pk AS rels_pk, rels.info_fk_one AS rels_info_fk_one 
FROM rels 
WHERE rels.info_fk_one = ?
[2006-04-01 20:19:56,967] [engine]: [3]
[u'5-3', u'7-3']
Finished

Reply via email to