On Oct 17, 1:11 pm, "Paul Johnston" <[EMAIL PROTECTED]> wrote:
> Elixir uses the Active Record pattern, which is more limited that the Data
> Mapper pattern. You have to have a 1:1 relationship between objects and
> tables, so you can't map and object to a select, or map multiple objects to
> a table. These are rare things to do, and in any case, you can use plain SA
> along side Elixir if you need.
>
> I don't want to go into all this detail in the document. I've had a go at
> rewording the paragraph, let me know what you think.

The addition to the paragraph explains this well, thanks.
(Incidentally however, is it possible to use Elixir with SQL views as
well as tables? If so, that would be one workaround for these rare
cases.)

> > "Plain SA with scoped_session. Use turbogears.database.session.mapper
> > as the mapper:" ... why does this syntax differ from the example
> > syntax given to you in a quick-started SA project, which uses
> > sqlalchemy.orm.mapper instead?
>
> If you use the latest trunk, session.mapper is the suggested default. This
> will be in 1.0.4 and above.

I have 1.0.4beta1, and the quick-started project uses
sqlalchemy.orm.mapper. Is quick-start wrong, or has this changed since
the beta release? (Not that I suppose it matters to me... I'll
probably have to restart my project to make it use Elixir anyway. :
(  )

> > It also doesn't give much detail on how to define the model.
>
> I've added links to the SA/Elixir docs. No sense duplicating.

I definitely see your point about not wanting to duplicate existing
information, but I think there's definitely a danger of the move to
SQLAlchemy meaning that there's less documentation on how to get
started than there was with SQLObject. I think "Defining Your Model"
should still be a Turbogears-specific piece of documentation, which
refers to SA/Elixir docs for elaboration. I appreciate that it may
fall outside the scope of the doc you have here, but I think it's
important for such a doc to exist /somewhere/ within the TG docs. I
don't think having to run all over the web to find out how to use this
thing is a good idea!

As an aside, one of the reasons I've read for wanting to move to SA is
that the documentation is superior to those for SO, which I can't
argue with. However, I would argue that the Elixir docs are not as
easy to use as the SO docs, so moving to SA and recommending Elixir on
top is not really beneficial from an ease-of-use point of view. I
don't know if others would agree however.

Cheers,
Ben Sizer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to