did you pass this directly to the database from your MYSQL admin app, or the terminal app:
SELECT t0.agência_id, RTRIM(t0.descrição), RTRIM(t0.domínio), t0.entidade_id, t0.imagem_grande_altura, t0.imagem_grande_largura, t0.imagem_pequena_altura, t0.imagem_pequena_largura, t0.logomarca_id, t0.miniatura_altura, t0.miniatura_largura, t0.número_pacotes_principais, t0.parteID, t0.situação, t0.temaID, RTRIM(t0.título_páginas), RTRIM(t0.título_site) FROM agência t0 WHERE t0.agência_id = 1 just to be pedantic? if you are correct, this should just work or throw the same error. --- On Thu, 9/13/12, Ângelo Andrade Cirino <[email protected]> wrote: > From: Ângelo Andrade Cirino <[email protected]> > Subject: Unknown column > To: "[email protected] Development" > <[email protected]> > Date: Thursday, September 13, 2012, 4:11 PM > Hi all, > What can cause this error? > 13 Set 16:21:50 > vtta[60002] DEBUG NSLog - === Begin Internal > Transaction13 Set 16:21:50 > vtta[60002] DEBUG NSLog - evaluateExpression: > <com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: > "SELECT t0.agência_id, RTRIM(t0.descrição), > RTRIM(t0.domínio), t0.entidade_id, t0.imagem_grande_altura, > t0.imagem_grande_largura, t0.imagem_pequena_altura, > t0.imagem_pequena_largura, t0.logomarca_id, > t0.miniatura_altura, t0.miniatura_largura, > t0.número_pacotes_principais, t0.parteID, t0.situação, > t0.temaID, RTRIM(t0.título_páginas), > RTRIM(t0.título_site) FROM agência t0 WHERE t0.agência_id > = ?" withBindings: 1:1(agênciaID)>13 Set 16:21:50 > vtta[60002] DEBUG NSLog - === Rollback Internal > Transaction13 Set 16:21:50 > vtta[60002] INFO > er.transaction.adaptor.Exceptions - Database Exception > occured: Unknown column 't0.logomarca_id' in > 'field list'at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method)at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at > java.lang.reflect.Constructor.newInstance(Constructor.java:513)at > com.mysql.jdbc.Util.handleNewInstance(Util.java:411)at > com.mysql.jdbc.Util.getInstance(Util.java:386)at > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)at > com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)at > com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)at > com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)at > com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)at > com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)at > com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)at > com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)at > com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndExecute(JDBCChannel.java:265)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:1306)at > com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4444)at > com.visionar.modelos._Agência.fetchAgênciaPorID(_Agência.java:879)at > vtta.app.Application.<init>(Application.java:48)at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method)at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at > java.lang.reflect.Constructor.newInstance(Constructor.java:513)at > java.lang.Class.newInstance0(Class.java:355)at > java.lang.Class.newInstance(Class.java:308)at > com.webobjects.appserver.WOApplication.main(WOApplication.java:547)at > er.extensions.appserver.ERXApplication.main(ERXApplication.java:826)at > vtta.app.Application.main(Application.java:31) > This logomarcaID is the foreign key for an > ERAttachment relationship. I assure you that the table has > the column and that the model is correct. > The generated class file correctly implements the > logomarcaID field and the getter and setter methods. The > generated migration class correctly creates the logomarca_id > table column. Finally, I have two other applications using > the very same model (the model is kept in a framework) that > do work and do not show this error. > It occurs when I try to fetch an entity at the > beginning of the application, it is the first fetch. I tried > with a fetch specification I created and with a > EOUtilities fetch and the outcome is the same. These are the > two methods: > @Override public void finishInitialization() > { super.finishInitialization(); > > //agência = > Agência.fetchAgênciaPorID(editingContext(), > agênciaID).objectAtIndex(0); agência = (Agência) > EOUtilities.objectsMatchingKeyAndValue(editingContext(), > "Agência", > "agênciaID", > 1).objectAtIndex(0); > NSLog.out.appendln("*** Sistema de > aplicação web Visiontur para a agência " + agência.títuloSite()); } > Of course I use one or the > other, not both at the same time. Regarding the UTF-8 > characters, I have been using them without problem, but in a > few points that I have very early identified and were UTF-8 > is avoided. > Angelo > -----Inline Attachment Follows----- > > > _______________________________________________ > Do not post admin requests to the list. They will be > ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com > > This email sent to [email protected] > _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
