Hi there,
On 21/06/2009, at 1:14 AM, Mike Schrag wrote:
> Ah .. here's the "why". This is a question for Lachlan ... I don't
> know if this was a merge problem or, if not, why he's piggy-backing
> on patchesModelOnLoad,
Which I'm not btw. patchesModelOnLoad doesn't need to be true.
> which I can't imagine ever actually wanting turned on.
I've got:
er.extensions.ERXModelGroup.patchModelsOnLoad=false
er
.extensions
.ERXModelGroup.prototypeModelNames=ISHEOPrototypes,erprototypes
well, okay I've also got:
er.extensions.defaultModelGroupClassName=ish.wonder.ISHModelGroup
What you want is:
er.extensions.ERXModel.useExtendedPrototypes=true
> You could also set er.extensions.ERXModelGroup.modelClassName to
> the Model class explicitly. I'm not sure we shouldn't default to
> that, actually?
>
> ms
>
> On Jun 20, 2009, at 11:06 AM, Kieran Kelleher wrote:
>
>> I had looked at the ERXModelGroup source to look for something that
>> might indicate some scheme like that, but had not noticed anything.
>> After getting your reply I now looked at ERXModelGroup svn history,
>> I see Anjo's commit of this feature to ERXModelGroup$Model on
>> 2/19/2009 and that you moved Anjo's logic for this over to ERXModel
>> subclass on 3/29/2009.
>>
>> It appears that the property
>> er.extensions.ERXModelGroup.patchModelsOnLoad needs to be true to
>> ensure that (ERXModelGroup$Model extends ERXModel extends EOModel)
>> is used instead of plain old EOModel.
Not so. The old ERXModelGroup$Model already extended EOModel and was
used for the patching of models on load. What I added was ERXModel
(which ERXModelGroup$Model now also extends) to share the code between
them for using custom prototypes.
So the default now is that the runtime model is always an ERXModel.
>> What might be a cause for concern is the fact that this property is
>> not listed anywhere in ERXExtensions/Properties or in a new
>> WOnderApp/Properties and in a default Wonder integration, this
>> propery defaults to false. Without looking at the source just now,
>> I would not have realized that I have never had that property set
>> to true in any app.
>>
>> So, to see what happens, I put that property into two apps just now
>> and they blow up with NPE's and terminate on startup.
Where's my stack trace? :-)
>> Just started 2 new discussion threads on those so we can see if we
>> can solve these 2 different NPE cases. If patchesModelsOnLoad can
>> only be used under certain conditions, I will happily document that
>> along with some docs that explain the Custom protos (aka extended
>> protos usage) and configuration.
Are you using a recent Wonder? There was an NPE fixed some weeks ago.
See thread "ERAttachment and own Prototypes" with Ramsey Gurley and
myself.
with regards,
--Lachlan Deck
This archive was generated by hypermail 2.0.0 : Sun Jun 21 2009 - 18:41:44 EDT