Re: WO 5.4.2 Prototypes and Manual Model Assembly
Re: WO 5.4.2 Prototypes and Manual Model Assembly
- Subject: Re: WO 5.4.2 Prototypes and Manual Model Assembly
- From: Mike Schrag <email@hidden>
- Date: Thu, 7 Aug 2008 09:48:32 -0400
I am cloning and modifying the model in the application constructor
to get a read-only model. This worked very well until I started to
use WO 5.4.2 prototypes. Once I started to use prototypes, the
prototypes' values are not being loaded in as the model is
constructed.
Looks like this process is pretty different in 5.4 ... So
EOAttribute has an _updateFromPrototype method you can call ... It
appears that is called on setPrototype, but I'm guessing it's not in
the model when that is called. It also appears that you can call
EOAdaptor.assignExternalInfoForEntireModel(model), which (among some
other things you'll have to verify as to whether or not they break
things) appears to be the only place that externally calls
_updateFromPrototype on all the attributes in the model. I'm not
exactly sure how the model loading process works now in 5.4 -- it's
something I'll have to dig around in to figure out better, but that
might at least get things working for you in the meantime.
For the record, these methods exist in 5.3, but I've just never had to
use them ... The process by which they are called internally has
obviously been changed, though.
ms
_______________________________________________
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