However EOF falls over as soon as I touch that entity with an error like the following. This is WO 5.3.3 btw. Looking at the source in EOSQLExpression, it would seem that the attribute_definitionArray is null, because if it is null, then the method tries to get a column name and throws this exception when there is no column name.. The eomodel itself shows the attribute like this in the plist:
So now I put a few statements in didFinishLaunhcing to grab that EOAttribute and check in the debugger and I find that the _definitionArray is empty. That does not seem right, does it?
I know Wonder uses programmatically created derived attributes for COUNT(*) and aggregate functions, but is there anyone out there using model-defined derived attributes successfully?
java.lang.IllegalStateException: sqlStringForAttribute: attempt to generate SQL for attribute 'uniqueID' on entity 'CTMessage' with undefined column name. You must define a column name for this attribute before attempting a database operation.
at com.webobjects.eoaccess.EOSQLExpression.sqlStringForAttribute(EOSQLExpression.java:2064)
at com.webobjects.jdbcadaptor.JDBCExpression.addSelectListAttribute(JDBCExpression.java:362)
at com.webobjects.eoaccess.EOSQLExpression.prepareSelectExpressionWithAttributes(EOSQLExpression.java:1006)
at com.webobjects.jdbcadaptor.JDBCExpression.prepareSelectExpressionWithAttributes(JDBCExpression.java:273)
at com.webobjects.eoaccess.EOSQLExpressionFactory.selectStatementForAttributes(EOSQLExpressionFactory.java:226)
at er.extensions.jdbc.ERXSQLHelper.sqlExpressionForFetchSpecification(ERXSQLHelper.java:635)
at er.extensions.jdbc.ERXSQLHelper.sqlExpressionForFetchSpecification(ERXSQLHelper.java:569)
at er.extensions.jdbc.ERXSQLHelper.rowCountForFetchSpecification(ERXSQLHelper.java:1110)
at er.extensions.eof.ERXEOAccessUtilities.rowCountForFetchSpecification(ERXEOAccessUtilities.java:458)
at er.extensions.batching.ERXBatchingDisplayGroup.rowCount(ERXBatchingDisplayGroup.java:292)
at er.extensions.batching.ERXBatchingDisplayGroup.refetch(ERXBatchingDisplayGroup.java:362)
at er.extensions.batching.ERXBatchingDisplayGroup.fetch(ERXBatchingDisplayGroup.java:438)
at wk.eofextensions.WKEOUtils.displayGroupWithFetchSpecification(WKEOUtils.java:1061)
at wk.cheetah.wocomponents.MessagesPage.dg(MessagesPage.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:684)
at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1600)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:46)
at com.webobjects.appserver.WOComponent.valueForBinding(WOComponent.java:735)
at er.extensions.batching.ERXFlickrBatchNavigation.displayGroup(ERXFlickrBatchNavigation.java:82)
at er.extensions.batching.ERXFlickrBatchNavigation.batchCount(ERXFlickrBatchNavigation.java:285)
at er.extensions.batching.ERXFlickrBatchNavigation.hasMultiplePages(ERXFlickrBatchNavigation.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:684)
at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1600)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:46)
at com.webobjects.appserver.WOAssociation.booleanValueInComponent(WOAssociation.java:278)
at er.extensions.components.conditionals.ERXWOConditional.conditionInComponent(ERXWOConditional.java:47)
at er.extensions.components.conditionals.ERXWOConditional.meetsConditionInComponent(ERXWOConditional.java:52)
at er.extensions.components.conditionals.ERXWOConditional.appendToResponse(ERXWOConditional.java:120)
at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:992)
at er.extensions.components.ERXComponent.appendToResponse(ERXComponent.java:107)
at com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:111)
at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at com.webobjects.appserver._private.WOComponentContent.appendToResponse(WOComponentContent.java:43)
at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at com.webobjects.appserver._private.WOGenericContainer.appendToResponse(WOGenericContainer.java:32)
at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:992)
at er.extensions.components.ERXComponent.appendToResponse(ERXComponent.java:107)
at wk.webobjects.appserver.WKAbstractComponent.appendToResponse(WKAbstractComponent.java:487)
at wk.cheetah.wocomponents.PageWrapper.appendToResponse(PageWrapper.java:247)
at com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:111)
at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:992)
at er.extensions.components.ERXComponent.appendToResponse(ERXComponent.java:107)
at wk.webobjects.appserver.WKAbstractComponent.appendToResponse(WKAbstractComponent.java:487)
at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:1200)
at er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java:540)
at wk.webobjects.appserver.WKSession.appendToResponse(WKSession.java:211)
at wk.cheetah.Session.appendToResponse(Session.java:442)
at com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.java:1418)
at er.extensions.appserver.ERXApplication.appendToResponse(ERXApplication.java:1817)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:230)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:287)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:322)
at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:358)
at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:435)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1915)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1880)
at wk.webobjects.appserver.WKApplication.dispatchRequest(WKApplication.java:276)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)