• 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: Creating EOModel and new databases dynamically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating EOModel and new databases dynamically


  • Subject: Re: Creating EOModel and new databases dynamically
  • From: Jean-François Veillette <email@hidden>
  • Date: Sun, 10 Jun 2007 10:10:09 -0400


Le 07-06-10 à 04:18, Thierry Kramis a écrit :

this might be a nice solution.  What you're asking to do is possible,

but certainly more work...

How would I realize this then?


Consider that all the comments bellow have not been tried by me, they are pure _speculation_ based on what I know ...

EOModel, EOEntity, EO... are all java objects.  The *.eomodeld file is just a serialization of java memory objects.  When you load a model, you do not configure objects, you _de-serialize_ objects.
Nothing stop you from creating EOModel using : EOModel a = new EOModel(); and all that stuff if it better suit your needs.

All that said, you can try to create your model object graph in memory based on user entry.  Look at the code Mike S. wrote for the new, eclipse based, EOModeler, it will certainly show how to create and configure a model correctly.
You will need to save your model, probably in a customer specific space (database), so what you might end up doing is :
- have a eomodel.eomodeld file that map EOF model object (EOEntity, EOAttributes, EORelationship, etc.) to database table so that you can store your memory created model in the customer's database.
- have a special initialization routine that once the 'eomodel' model is loaded, it load supplemental model objects graph from the database, and add all that stuff to the default model group, so that transparently EOF consider the model loaded from the db as part of the model graph.

This is an interesting problem, even though I think it can be solved as described above, I think the devil will show up in the details (startup initialization, modification of the model object graph and snapshot handling of modelled objects) and this is where you might realize that It wasn't a viable solution.  I don't know, you will have to try it.

Tell us why it failed
... or ...
Tell us if you succeed !

Good luck,

- jfv

 _______________________________________________
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: 
 >FW: Creating EOModel and new databases dynamically (From: Thierry Kramis <email@hidden>)

  • Prev by Date: Re: Creating EOModel and new databases dynamically
  • Next by Date: WO 4.5 on NT & Env Vars
  • Previous by thread: FW: Creating EOModel and new databases dynamically
  • Next by thread: FW: Creating EOModel and new databases dynamically
  • Index(es):
    • Date
    • Thread