• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Altering EOModel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Altering EOModel


  • Subject: Re: Altering EOModel
  • From: Ray Kiddy <email@hidden>
  • Date: Sat, 17 Jan 2009 16:57:22 -0800


Stavros -

The documentation on this should really be pretty clear. Look in the API references. Do you want to change the model? Look at the EOModel class (full name = com.webobjects.eoaccess.EOModel). That will lead you to other classes, for example, EOModelGroup, EOEntity, EOAttribute, EORelationship and so on.

If you are looking for narrative documentation, you probably will not find any. Changing models dynamically is done, but it is not commonly done by very many. So, it gets less documentation.

One point to remember is that if you have an app changing the model, you will want to have your app listen for various notifications. Look at the references for NSNotificationCenter for this. I cannot remember all the notifications, but you can find them as fields in some of the classes. For example, see the ModelAddedNotification in EOModelGroup and the EntityLoadedNotification in EOModel.

Be aware that if model information changes, then the different editing contexts in your application will have to deal with the fact that their registered objects may have been created before any changes and may try to save after any changes. There are lots of interesting ways to mess yourself up in this.

FYI, I often find it helpful to search Apple's document, but whatever you do, do not do the search on Apple sites. Apple's search can be worse than useless. I always do a google search for something with "site:apple.com". That way, one can find things from different groups within Apple, even when those groups do not coordinate their documentation.

Good luck.

cheers - ray


On Jan 16, 2009, at 12:20 PM, Stavros Panidis wrote:

Hi all,

I am developing an application where I want to give to the end user the ability to alter EOModel and database, that is to add fields in a table, or to add a new table and to be able to insert and/or edit data on this table.

I am sure that there is a way to do it but as with the whole WebObjects documentation is a miracle to find out how (at least for a new comer like me).

Can anyone suggest to me some APIs or readings about this?

Many thanks in advance


Stavros
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Altering EOModel (From: Stavros Panidis <email@hidden>)

  • Prev by Date: Re: Class names or value type mismach in EOModel ?
  • Next by Date: Re: SQLite INSERT errors with WO
  • Previous by thread: Altering EOModel
  • Next by thread: Re: Altering EOModel
  • Index(es):
    • Date
    • Thread