hmm... but i was thinking of having specialized methods for every
table/object. am i missing something from your suggestion? how would
you have a base class that would somehow specialize depending on the
child object?
i went ahead and executed my mixin idea by attacking the db._cache
dict with
On Nov 17, 2010, at 4:05 PM, J wrote:
hmm... but i was thinking of having specialized methods for every
table/object. am i missing something from your suggestion?
No, SqlSoup only offers the base class for all objects as an option. Here's a
patch you can try:
diff -r 67d8f4e2fcb9
to get this working, i had to add a line to clear the cache entry for
attr if the base argument was passed in:
def entity(self, attr, schema=None, base=None):
if base: del self._cache[attr] # ADDED LINE
try:
t = self._cache[attr]
except KeyError, ke: