Re: DB Columns showing up twice in SQL statement.
Re: DB Columns showing up twice in SQL statement.
- Subject: Re: DB Columns showing up twice in SQL statement.
- From: David Sargent <email@hidden>
- Date: Wed, 23 Aug 2006 12:49:40 -0600
I have seen this before when you copy and paste or duplicate an
column in EOModeler. EOModeler will change the java property but
leave the DB column name the same and you will end up with 2 columns
in your model the same.
David
On Aug 23, 2006, at 12:29 PM, Zac Konopa wrote:
Hey all,
I've got another weird one. Oddly enough for me on this one for
once I know exactly what's wrong. I'm trying to insert a row into
my MySQL db and I get the error you see below:
Application: LeftHandMan
Error: com.webobjects.eoaccess.EOGeneralAdaptorException:
EvaluateExpression failed: : Next exception:SQL State:42000 --
error code: 1110 -- msg: Syntax error or access violation message
from server: "Column 'videoURLmediumHd' specified twice"
Reason: EvaluateExpression failed:
<com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "INSERT
INTO seminar(descr, couponGraphicFilePath, graphicTwo,
videoURLmediumHd, videoURLteaser, startDate, landingTemplate,
optMsgA, graphicOne, videoURLmedium, videoURLbig, viewingTemplate,
videoURLsmall, thankYou, graphicThree, perUseCost, couponImageURL,
graphicOneLinkDescr, moviePoster, graphicTwoLink, filePath,
couponGraphic, graphicTwoLinkDescr, graphicTwoFilePath,
videoURLmediumHd, videoURLbigHd, endDate, campaignID, creationDate,
subhead, graphicThreeLink, graphicThreeLinkDescr, graphicOneLink,
optMsgB, videoURLipod, seminarName, graphicThreeFilePath,
landingFilePath, template, seminarID, viewingFilePath,
moviePosterFilePath, graphicOneFilePath) VALUES (NULL, NULL, NULL,
NULL, NULL, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, ?, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ?, NULL,
NULL, NULL, ?, NULL, NULL, NULL)" withBindings: 1:2006-06-01
00:00:00(startDate), 2:2006-06-01 00:00:00(endDate), 3:9
(campaignID), 4:"Test Seminar 1"(seminarName), 5:16(seminarID)>:
Next exception:SQL State:42000 -- error code: 1110 -- msg: Syntax
error or access violation message from server: "Column
'videoURLmediumHd' specified twice"
Stack trace:
File Line# Method Package
EODatabaseContext.java 4685
_exceptionWithDatabaseContextInformationAdded com.webobjects.eoaccess
EODatabaseContext.java 6393 performChanges com.webobjects.eoaccess
EOObjectStoreCoordinator.java 415 saveChangesInEditingContext
com.webobjects.eocontrol
EOEditingContext.java 3226 saveChanges com.webobjects.eocontrol
SeminarManagement.java 311 saveChanges SeminarManagement
NativeMethodAccessorImpl.java NA invoke0 sun.reflect
NativeMethodAccessorImpl.java 39 invoke sun.reflect
DelegatingMethodAccessorImpl.java 25 invoke sun.reflect
Method.java 585 invoke java.lang.reflect
KeyValueCodingProtectedAccessor.java 54 methodValue
KeyValueCodingProtectedAccessor
NSKeyValueCoding.java 1160 valueInObject com.webobjects.foundation
NSKeyValueCoding.java 1268 valueForKey com.webobjects.foundation
WOComponent.java 1539 valueForKey com.webobjects.appserver
NSKeyValueCoding.java 498 valueForKey com.webobjects.foundation
NSKeyValueCodingAdditions.java 212 valueForKeyPath
com.webobjects.foundation
WOComponent.java 1600 valueForKeyPath com.webobjects.appserver
WOKeyValueAssociation.java 46 valueInComponent
com.webobjects.appserver._private
WOHyperlink.java 76 invokeAction com.webobjects.appserver._private
WODynamicGroup.java 101 invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java 110 invokeAction
com.webobjects.appserver._private
WOConditional.java 55 invokeAction
com.webobjects.appserver._private
WODynamicGroup.java 101 invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java 110 invokeAction
com.webobjects.appserver._private
WOComponent.java 945 invokeAction com.webobjects.appserver
WOSession.java 1168 invokeAction com.webobjects.appserver
WOApplication.java 1375 invokeAction com.webobjects.appserver
WOComponentRequestHandler.java 196 _dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java 287 _dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java 322
_dispatchWithPreparedApplication com.webobjects.appserver._private
WOComponentRequestHandler.java 358 _handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java 432 handleRequest
com.webobjects.appserver._private
WOApplication.java 1306 dispatchRequest com.webobjects.appserver
WOWorkerThread.java 173 runOnce com.webobjects.appserver._private
WOWorkerThread.java 254 run com.webobjects.appserver._private
Thread.java 613 run java.lang
The nice thing is that it's obvious what's happening. The insert
statement has a column specified twice. 'videoURLmediumHd' The
problem is that I'm not writing this sql statement. It's being
generated by the EO layer when I try to save a new object. I have
no idea where to go from here. I've checked the model
specification and there is only one field with that name in the
model and the db, so I have no idea where EO is getting the
erroneous occurrence of the column name. As always any help is
greatly appreciated.
Thanks
Zac
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40holicow.com
This email sent to email@hidden
_______________________________________________
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