[OGo-Developer] Adding information to EOModel?

Helge Hess developer@opengroupware.org
Sat, 25 Nov 2006 02:28:09 +0100


On Nov 24, 2006, at 21:20, Adam Tauno Williams wrote:
> Is it possible for a bundle to add informatOGoModel.mion (like an
> additional table) to OGo's EOModel?  Or 'basic' objects?
>
> I see that Misc/Invoice adds commands ("invoice::set") but
> OGoModel/Classes already contains LSInvoice and
> Database/OGoModel/OpenGroupware.org_PostgreSQL.eomodel already  
> contains
> the invoice tables.
>
> It looks like these files get installed
> into /usr/local/lib/opengroupware.org-1.1/commands/OGo.model/ 
> Resources/
> (at least on my system).  Will it be effective to 'patch' these files
> when a bundle is installed (adding additional information to
> OpenGroupware.org_PostgreSQL.eomodel)?

I'm not entirely sure what your question is, but the model is self- 
contained. You can't add additional stuff by adding additional files.  
(EOF 2+ has something called an EOModelGroup which allows that, but  
we don't)

Having said that, if you write a new application you don't need to  
use classes like LSInvoice. You would probably use EOGenericRecord or  
even more likely access the database directly (using EOAdaptor etc).

Of course you can patch the installed files, but it will get  
overridden with the next update ...

Greets,
   Helge
-- 
Helge Hess
http://docs.opengroupware.org/Members/helge/