As a supporter and heavy user of the `with_fields`-syntax I like your
proposal. It seems easier to use and looks more natural to me. And it
would remove lines of code (and a level of indentation) in most of my
cases.
On 29 Aug., 16:36, Jonathan LaCour <[EMAIL PROTECTED]>
wrote:
> That being said, I think its time that we went ahead and deprecated
> `with_fields` in favor of the "OO" approach, since the syntaxes will end
> up being quite similar, with the added bonus of preserving field order:
>
> class Person(Entity):
> id = Field(Integer, primary_key=True)
> name = Field(String)
>
> has_many('pets', of_kind='Pet', inverse='owner')
>
> In the long-term, we might want to deprecate `has_field` as well, so
> that we will have only one way to do things. I am hesitant to do this
> right now, but I haven't been happy having two ways to do the same thing
> for some time now, and I think we need to resolve this at some point.
>
> [...]
>
> Gaetan, Daniel, how do you guys feel about this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---