Re: Mismatch between model and database
Re: Mismatch between model and database
- Subject: Re: Mismatch between model and database
- From: Pascal Robert <email@hidden>
- Date: Mon, 06 Jun 2011 09:23:00 -0400
I removed all uneeded attributes and prototypes, now I'm getting this:
juin 06 09:06:30 eGM[64233] ERROR er.extensions.ERXExtensions - Failed to generate sql string for qualifier (districtKey = '33000260') on entity <EOEntity Location
...
So look like part of the problem is that districtSelection.primaryKey(), which I use for the qualifier, returns a string instead of a number. So I modified the qualifier to build a Long out of the string, but I'm getting the same error again.
> Hi Pascal,
>
> This sounds like our stuff that you're working on. I think I had an open question to the list on this actually. For some reason, when a model is reverse engineered and a prototype is incorrectly assigned to a column this error seems to occur. The reverse engineering process is making the assumption that if a column's data type matches a prototype, that attribute must be of that prototype's type. This is clearly incorrect though. For example you may just have a column that is varchar(5), it's not necessarily a boolean prototype. It would be good if the prototype mapping can be turned on/off when reverse engineering. The only solution I've found is to go through and manually remove the prototypes, so that's what I've been doing. The problem is the next time I need to refresh the mapping and rev. eng. the newer tables, prototype removal will need to be done again.
>
> -Mike
>
>
> On Jun 2, 2011, at 2:47 PM, Pascal Robert wrote:
>
>> I'm getting some mismatch types for an attribute that is part of a model that was created from reverse engineering. Look like it's a mismatch between a String type and a number column, but sadly the exception is not saying which column or attribute it is, and no success by using breakpoints.
>>
>> Is there a trick to find which column is the problem? Checking manually more than 150 attributes would be a real PITA :-)
>>
>> Thanks.
>>
>> juin 02 14:37:33 eGM[49754] WARN NSLog - <er.ajax.AjaxRequestHandler>: Exception occurred while handling request:
>> N/A
>> [2011-6-2 14:37:33 EDT] <WorkerThread8> N/A
>> at com.webobjects.jdbcadaptor.JDBCColumn.takeInputValue(JDBCColumn.java:621)
>> at com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndExecute(JDBCChannel.java:260)
>> at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:337)
>> at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:296)
>> at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java:220)
>> at com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(EODatabaseChannel.java:897)
>> at com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:234)
>> at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3055)
>> at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195)
>> at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
>> at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
>> at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1206)
>> at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4444)
>> ...
>> <ATT00001..txt>
>
_______________________________________________
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