Does pparking0_ exist as a valid alias in the generated query? Does AddressId
exist as a valid column in that table in your database?

On Sun, Jul 4, 2010 at 12:03 PM, Paweł <[email protected]> wrote:

> I had a quite old Castle dll files in my project and decided to
> upgrade them to the newest version.
> ActiveRecord and NHibernate were among them. When I launched the
> project some HQL queries
> run fine but some of them stopped working and threw exception. All
> exceptions have the same reason. I run the generated SQL query in a
> MySql client app and it brought up the same error (Unknown column
> xxxxx in 'on clause'). It's strange because before upgrading the dll
> files everything worked fine. It seems that nhibernate has changed the
> way it generates SQL statements from HQL
>
> Has anyone come across above issue and knows a workaround?
>
>
>
> ActiveRecordException
>
>        Message:
>        Could not perform ExecuteQuery for PMiejsce
>
>                StackTrace:
> .
> .
> .
> .
>
>                <b>Inner exception:</b>
>                        ADOException
>
>        Message:
>        could not execute query
> .
> .
> .
> .
> <b>Inner exception:</b>
>                        MySqlException
>
>        Message:
>        Unknown column 'pparking0_.AddressId' in 'on clause'
>
>
>        StackTrace:
>           at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
>   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32&
> affectedRow, Int32& insertedId)
>   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId,
> Int32& affectedRows, Int32& insertedId)
>   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)
>   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
>   at
> MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior
> behavior)
>   at
> MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior
> behavior)
>   at
> System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
>   at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
>   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean
> autoDiscoverTypes, Boolean callable, RowSelection selection,
> ISessionImplementor session)
>   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session,
> QueryParameters queryParameters, Boolean returnProxies)
>   at
>
> NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor
> session, QueryParameters queryParameters, Boolean returnProxies)
>   at NHibernate.Loader.Loader.DoList(ISessionImplementor session,
> QueryParameters queryParameters)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to