Re: [SQLObject] Strange ForeignKey behavior...
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Nathan E. <nj...@ge...> - 2015-12-23 17:10:00
|
>> I'll see if I can figure out a minimalist patch to >> propose... > > Eagerly waiting! But if you don't succeed notify me -- I'll at least > add a TODO item. Not sure if this will be up to your coding standards, but here is an attempt - it uses the validator infrastructure to attempt conversion using the idType function of the foreign table. This will suffice to ensure values can be converted to the correct type, next level of validation would be to require the converted value to be a valid id for the foreign table (probably too much overhead). I think this approach is relatively consistent with the current style and conventions, but I'm sure you'll tell me if not. :-) Patch for col.py and a new test module attached. Cheers! - n -- Dr. Nathan Edwards nj...@ge... Department of Biochemistry and Molecular & Cellular Biology Georgetown University Medical Center Room 1217, Harris Building, 3300 Whitehaven St, NW, Washington DC 20007 Phone: 202-687-7042, Fax: 202-687-0057 |