[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GDL2 problem
From: |
Matt Rice |
Subject: |
Re: GDL2 problem |
Date: |
Sat, 13 Jun 2015 08:22:27 -0700 |
On Sat, Jun 13, 2015 at 2:37 AM, Edwin Ancaer <eancaer@gmail.com> wrote:
> Replace @"Persons" by @"persons" in
> authorsDS = [[EODatabaseDataSource alloc] initWithEditingContext: ec
> entityName:@"persons"];
> and the error goes away, you old fool.
>
> And go get yourself another rubber duck....
>
> But I still don't see how authorsDS gets the info from aModel, unless the
> globalModelGroup is somewhere available for all EOF classes...
>
It is, EODatabaseDataSource -(EOEntity *)entity
goes through a song and dance looking for a model group,
if it gets to the end without finding anything it defaults to globalModelGroup.
where the Entity is contained in a model.
To explain *why* its like this though, you can kind of see the
revision below of the testsuite which sets up a model to work with
different adaptors via an environment variable, so the testsuite can
be run with multiple adaptors, using the same TSTTradingModel.eomodeld
(IIRC it just sets some stuff up in the connection dictionary).
This can be taken a little bit further in that you can connect to 2
variations of the same model, by EODatabaseDataSource delegate I
believe
(controlling which model group EODatabaseDataSource -entity finds.)
with that you can in theory connect to 2 variations of a model
(flipping bits in the connection dictionary), with different adaptors,
from the same program.
I don't really recall if that is tested though, hope this helps
explain things though.
http://svn.gna.org/viewcvs/gnustep?view=revision&revision=23668