[Z3-sqlos] Problems with the NameChooser
Brian Sutherland
jinty at web.de
Tue Nov 15 03:33:03 CET 2005
Hi all,
I just documented this bug in the sqlos TODO.txt. I would solve it, but
am quite unsure of how.
* There is a bug related to SQLObject names. Most of sqlos thinks that the
name of an object is equal to ${factory_id}.${sqlobject_id} where the factory
id is set in ZCML. This mostly works fine and is quite unique. The only
problem is in the Adding view, where the NameChooser guesses the name to be
${package}.${class}.${sqlobject_id}. This means that in order to use the
adding view all sqlos:factory declarations have to have an id of this form
or the Adding view will error when it tries container[name]. Unfortunately I
cannot see an easy and correct way to get the factory id inside the
NameChooser.
I only have 3 bad ideas:
* Use a different scheme for object names. i.e. something attached
to the object itself. (tablename.sqlrow for instance), that way we
could implement __name__ as a property. tablename is probably more
unique than factory id.
* Set the name on the object as it is created in the factory, the
name chooser would then pick it up.
* Some really evil fuzzy search (this is not really an option)
Any ideas?
Without a good one, we should probably just leave things as they are.
--
Brian Sutherland
Metropolis - "it's the first movie with a robot. And she's a woman.
And she's EVIL!!"
More information about the z3-sqlos
mailing list