On Tue, Jun 10, 2008 at 4:12 PM, Jonathan LaCour <[EMAIL PROTECTED]> wrote: > > Jason R. Coombs wrote: > >> The new Entity.set in Elixir 0.6 breaks some of my projects. > > Sorry to hear that (and sorry it took me so long to reply). > >> In 0.5.2, the __init__ and .set methods performed the same >> function: >> for key, value in kwargs.items(): >> setattr(self, key, value) >> >> My first question is, why didn't __init__() just call set()?
I can't find any good reason for that. It was just an oversight I suppose. >> you looking forward to the changes in 0.6? Even in 0.6, should >> __init__ just call set()? Yes I think it should, but we should first make sure from_dict is a superset of the "set" method functionality (which I thought it was). >> Perhaps the answer lies in my second >> question. Indeed. >> Is there perhaps a better way to implement the to/from_dict >> methods to (a) better handle properties whose names differ from >> the column names and (b) allow set to be backward compatible with >> 0.5? Yes, that should be the case IMO. >> I wanted to start with the discussion here. Let me know if I >> should post any of these in the trac ticket system. Please do. > I think you are right after reviewing your reasoning. Go ahead and > open a ticket, and reply to this list when you've done so. Once > Gaetan gets back into the swing of things, we can have a discussion > about the reasoning for the original change, and see if we can come > up with a better solution before we release a new version. The reasoning was just to augment the set method with more functionality. I just didn't realize it was not backward compatible when I applied the patch from Paul Johnston. Should be fixable though. Anybody want to try his luck at fixing this? -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
