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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]