These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Composite-Id causing error: Column ID not in table
PostPosted: Thu Nov 16, 2006 5:14 pm 
Newbie

Joined: Thu Nov 16, 2006 4:17 pm
Posts: 5
Hello All,

We have a legacy DB2 database on AS400 and what I'm trying to do is map one of the tables to the class defined. The good thing is, the only operation we'r allowed to perform on this legacy database is SELECT.

But, for some reason I can't get the query to work here! I keep getting a message "invalid column ID" and I know that there is no column ID in that table, but that's the name I'm using for the composite key.

I'm still not quite used to NHibernate, but I would really like to use it for this purpose.

Here are the details that you might need to understand the details...

NHibernate version: 1.0.2

Mapping documents:
Code:

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" default-cascade="none">

    <class
        name="AS400.Domain.CoilProcessHistoryImpl, As400.Core"
        table="xxxPRD.CMCYCPP"
        dynamic-insert="false"
        dynamic-update="false"
        lazy="true">

      <composite-id class="AS400.Domain.CoilProcessHistoryKey, AS400.Core" access="nosetter">
        <key-property name="ProcessSequence" type="Int32" column="column1" />
        <key-property name="ProcessCode" type="String" column="column2" />
      </composite-id>

        <property name="ProcessCode" type="String" insert="false" update="false">
            <column name="column1" not-null="true" unique="false" sql-type="VARCHAR(255)"/>
        </property>

        <property name="ProcessSequence" type="Int32" insert="false" update="false">
            <column name="column2" not-null="true" unique="false" sql-type="INTEGER"/>
        </property>

        <property name="ColdMillProduct" type="String">
            <column name="column3" not-null="true" unique="false" sql-type="VARCHAR(255)"/>
        </property>

        <property name="CoilTypeCode" type="String">
            <column name="column4" not-null="true" unique="false" sql-type="VARCHAR(255)"/>
        </property>

        <property name="ColdMillCoilId" type="Double">
            <column name="column5" not-null="true" unique="false" sql-type="FLOAT"/>
        </property>

        <!-- Few more properties follow ... -->

    </class>

</hibernate-mapping>



Code for the class(s):

Code:

[serializable]
public class CoilProcessHistoryKey {
  private int _processSequence;
  private string _processCode;

  // Properties for these attributes defined here

  // Contructors are defined here

  // Equals(), GetHashCode() and ToString() are overriden here
}

public abstract class CoilProcessHistory {
  private CoilProcessHistoryKey _id;
  private String _processCode;
  private int _processSequence;
  private String _coldMillProduct;
  private String _coilTypeCode;
  private double _coldMillCoilId;

  // Other private attributes follow ...

  // Properties for all these private attributes defined here

  // Equals(), GetHashCode() and ToString() are overriden here

  // A factory method defined here
}


There is a Dao class that I use to actually run the query. The code for that is here ...

Code:

public virtual Object Load(int transform, int processSequence, string processCode)
        {
          string hqlQuery = "from CoilProcessHistoryImpl as cphi " +
                            "where cphi.ProcessSequence = " + processSequence.ToString() + " and " +
                            "      cphi.ProcessCode = " + processCode;
          Object entity = Session.Find(hqlQuery);
            return TransformEntity(transform, (AS400.Domain.CoilProcessHistory)entity);
        }



Full stack trace of any exception that occurs:

Code:

NHibernate.ADOException: Could not execute query ---> System.Data.Odbc.OdbcException: ERROR [42S22] [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0205 - Column ID not in table table_name in database_name.
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
   at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
   at NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
   --- End of inner exception stack trace ---
   at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
   at NHibernate.Impl.SessionImpl.Find(String query)
   at AS400.Domain.CoilProcessHistoryDaoBase.Load(Int32 transform, Int32 processSequence, String processCode) in C:\Documents and Settings\Sandeep_Joshi\My Documents\Visual Studio 2005\Projects\As400\As400.Core\target\AS400\Domain\CoilProcessHistoryDaoBase.cs:line 38
   at Service.GetCoilProcessHistory(Int32 processSequence, String processCode) in c:\inetpub\wwwroot\AS400.Service\App_Code\Service.vb:line 16




Name and version of the database you are using: DB2 (not sure what ver it is)

The generated SQL:

Code:

2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Hql.QueryTranslator - HQL: from AS400.Domain.CoilProcessHistoryImpl as cphi where cphi.ProcessSequence = 177 and       cphi.ProcessCode = 10
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Hql.QueryTranslator - SQL: select coilproces0_.CYANNC as CYANNC, coilproces0_.CYA0CE as CYA0CE, coilproces0_.CYAMDT as CYAMDT, coilproces0_.CYACTM as CYACTM, coilproces0_.CYUFNB as CYUFNB, coilproces0_.CYZSNU as CYZSNU, coilproces0_.CYFTDT as CYFTDT, coilproces0_.CYQCCD as CYQCCD, coilproces0_.CYUCNB as CYUCNB, coilproces0_.CYQVCD as CYQVCD, coilproces0_.CYAEVN as CYAEVN, coilproces0_.CYQWCD as CYQWCD, coilproces0_.CYAACE as CYAACE, coilproces0_.CYAEST as CYAEST, coilproces0_.CYBFNC as CYBFNC, coilproces0_.CYACVN as CYACVN, coilproces0_.CYUANB as CYUANB, coilproces0_.CYALDT as CYALDT, coilproces0_.CYABVN as CYABVN, coilproces0_.CYAAND as CYAAND, coilproces0_.CYZRNU as CYZRNU, coilproces0_.CYAXSS as CYAXSS, coilproces0_.CYZ2SS as CYZ2SS, coilproces0_.CYADVN as CYADVN, coilproces0_.CYABTM as CYABTM, coilproces0_.CYAWSS as CYAWSS, coilproces0_.ID as ID, coilproces0_.CYN0CD as CYN0CD from xxxPRD.CMCYCPP coilproces0_ where (coilproces0_.CYANNC=177)and(coilproces0_.CYA0CE=10)
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Impl.BatcherImpl - Opened new IDbCommand, open IDbCommands :1
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Impl.BatcherImpl - Building an IDbCommand object for the SqlString: select coilproces0_.CYANNC as CYANNC, coilproces0_.CYA0CE as CYA0CE, coilproces0_.CYAMDT as CYAMDT, coilproces0_.CYACTM as CYACTM, coilproces0_.CYUFNB as CYUFNB, coilproces0_.CYZSNU as CYZSNU, coilproces0_.CYFTDT as CYFTDT, coilproces0_.CYQCCD as CYQCCD, coilproces0_.CYUCNB as CYUCNB, coilproces0_.CYQVCD as CYQVCD, coilproces0_.CYAEVN as CYAEVN, coilproces0_.CYQWCD as CYQWCD, coilproces0_.CYAACE as CYAACE, coilproces0_.CYAEST as CYAEST, coilproces0_.CYBFNC as CYBFNC, coilproces0_.CYACVN as CYACVN, coilproces0_.CYUANB as CYUANB, coilproces0_.CYALDT as CYALDT, coilproces0_.CYABVN as CYABVN, coilproces0_.CYAAND as CYAAND, coilproces0_.CYZRNU as CYZRNU, coilproces0_.CYAXSS as CYAXSS, coilproces0_.CYZ2SS as CYZ2SS, coilproces0_.CYADVN as CYADVN, coilproces0_.CYABTM as CYABTM, coilproces0_.CYAWSS as CYAWSS, coilproces0_.ID as ID, coilproces0_.CYN0CD as CYN0CD from xxxPRD.CMCYCPP coilproces0_ where (coilproces0_.CYANNC=177)and(coilproces0_.CYA0CE=10)
2006-11-16 01:46:46 PM [828] INFO  NHibernate.Loader.Loader - select coilproces0_.CYANNC as CYANNC, coilproces0_.CYA0CE as CYA0CE, coilproces0_.CYAMDT as CYAMDT, coilproces0_.CYACTM as CYACTM, coilproces0_.CYUFNB as CYUFNB, coilproces0_.CYZSNU as CYZSNU, coilproces0_.CYFTDT as CYFTDT, coilproces0_.CYQCCD as CYQCCD, coilproces0_.CYUCNB as CYUCNB, coilproces0_.CYQVCD as CYQVCD, coilproces0_.CYAEVN as CYAEVN, coilproces0_.CYQWCD as CYQWCD, coilproces0_.CYAACE as CYAACE, coilproces0_.CYAEST as CYAEST, coilproces0_.CYBFNC as CYBFNC, coilproces0_.CYACVN as CYACVN, coilproces0_.CYUANB as CYUANB, coilproces0_.CYALDT as CYALDT, coilproces0_.CYABVN as CYABVN, coilproces0_.CYAAND as CYAAND, coilproces0_.CYZRNU as CYZRNU, coilproces0_.CYAXSS as CYAXSS, coilproces0_.CYZ2SS as CYZ2SS, coilproces0_.CYADVN as CYADVN, coilproces0_.CYABTM as CYABTM, coilproces0_.CYAWSS as CYAWSS, coilproces0_.ID as ID, coilproces0_.CYN0CD as CYN0CD from xxxPRD.CMCYCPP coilproces0_ where (coilproces0_.CYANNC=177)and(coilproces0_.CYA0CE=10)
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.SQL - select coilproces0_.CYANNC as CYANNC, coilproces0_.CYA0CE as CYA0CE, coilproces0_.CYAMDT as CYAMDT, coilproces0_.CYACTM as CYACTM, coilproces0_.CYUFNB as CYUFNB, coilproces0_.CYZSNU as CYZSNU, coilproces0_.CYFTDT as CYFTDT, coilproces0_.CYQCCD as CYQCCD, coilproces0_.CYUCNB as CYUCNB, coilproces0_.CYQVCD as CYQVCD, coilproces0_.CYAEVN as CYAEVN, coilproces0_.CYQWCD as CYQWCD, coilproces0_.CYAACE as CYAACE, coilproces0_.CYAEST as CYAEST, coilproces0_.CYBFNC as CYBFNC, coilproces0_.CYACVN as CYACVN, coilproces0_.CYUANB as CYUANB, coilproces0_.CYALDT as CYALDT, coilproces0_.CYABVN as CYABVN, coilproces0_.CYAAND as CYAAND, coilproces0_.CYZRNU as CYZRNU, coilproces0_.CYAXSS as CYAXSS, coilproces0_.CYZ2SS as CYZ2SS, coilproces0_.CYADVN as CYADVN, coilproces0_.CYABTM as CYABTM, coilproces0_.CYAWSS as CYAWSS, coilproces0_.ID as ID, coilproces0_.CYN0CD as CYN0CD from xxxPRD.CMCYCPP coilproces0_ where (coilproces0_.CYANNC=177)and(coilproces0_.CYA0CE=10)



Debug level Hibernate log excerpt:

After instantialing command object rest of the DEBUG level log says ...

Code:

2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Connection.DriverConnectionProvider - Obtaining IDbConnection from Driver
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Util.ADOExceptionReporter - SQL Exception
System.Data.Odbc.OdbcException: ERROR [42S22] [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0205 - Column ID not in table CMCYCPP in xxxPRD.
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
   at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session)
2006-11-16 01:46:46 PM [828] WARN  NHibernate.Util.ADOExceptionReporter - System.Data.Odbc.OdbcException: ERROR [42S22] [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0205 - Column ID not in table CMCYCPP in xxxPRD.
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
   at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session)
2006-11-16 01:46:46 PM [828] ERROR NHibernate.Util.ADOExceptionReporter - ERROR [42S22] [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0205 - Column ID not in table CMCYCPP in xxxPRD.
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Impl.BatcherImpl - Closed IDbCommand, open IDbCommands :0
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Impl.SessionImpl - closing session
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Impl.SessionImpl - disconnecting session
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Connection.ConnectionProvider - Closing connection
2006-11-16 01:46:46 PM [828] DEBUG NHibernate.Impl.SessionImpl - transaction completion
2006-11-16 01:46:46 PM [828] DEBUG AndroMDA.NHibernateSupport.DefaultSessionManager - Closed hibernate session



Any help is appreciated

Thanks,

Sandeep


Top
 Profile  
 
 Post subject: Re: Composite-Id causing error: Column ID not in table
PostPosted: Thu Nov 16, 2006 6:10 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
shatru2k wrote:
Code:

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" default-cascade="none">

    <class
        name="AS400.Domain.CoilProcessHistoryImpl, As400.Core"
        table="xxxPRD.CMCYCPP"
        dynamic-insert="false"
        dynamic-update="false"
        lazy="true">

      <composite-id class="AS400.Domain.CoilProcessHistoryKey, AS400.Core" access="nosetter">
        <key-property name="ProcessSequence" type="Int32" column="column1" />
        <key-property name="ProcessCode" type="String" column="column2" />
      </composite-id>

        <property name="ProcessCode" type="String" insert="false" update="false">
            <column name="column1" not-null="true" unique="false" sql-type="VARCHAR(255)"/>
        </property>

        <property name="ProcessSequence" type="Int32" insert="false" update="false">
            <column name="column2" not-null="true" unique="false" sql-type="INTEGER"/>
        </property>


It looks to me like you're mapping the 'column1' and 'column2' columns twice - once in the composite and again in properties. It also appears that they are swapped - column1 is ProcessSequence in the composite but ProcessCode in the properties.

Drop those two properties and see if that helps.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 6:22 pm 
Newbie

Joined: Thu Nov 16, 2006 4:17 pm
Posts: 5
Hello k-dub,

Thanks for noticing that.

Also, I tried your suggestion, but it didn't make any difference, so far.

Thanks,

Sandeep


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 6:59 pm 
Newbie

Joined: Thu Nov 16, 2006 4:17 pm
Posts: 5
I found new piece of evidance in the log4net log

Code:

2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> CYANNC, CYA0CE, type: CoilProcessHistoryKey
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillProduct -> CYN0CD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CoilTypeCode -> CYQCCD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillCoilId -> CYAAND, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: BuildingCode -> CYQVCD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColumnNumber -> CYZRNU, type: Int32
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillRow -> CYQWCD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillPosition -> CYZSNU, type: Int32
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillQualityCode -> CYAACE, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateDate -> CYALDT, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateTime -> CYABTM, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateUser -> CYABVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateProgram -> CYACVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeDate -> CYAMDT, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeTime -> CYACTM, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeUser -> CYADVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeProgram -> CYAEVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: RecordStatus -> CYAEST, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: DatePutInLocation -> CYFTDT, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: PostedStatus -> CYAWSS, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: EditedStatus -> CYAXSS, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: PrintedStatus -> CYZ2SS, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: DataEntryBatchNumber -> CYBFNC, type: Int32
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: GaugeAfterProcessing -> CYUANB, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: WidthAfterProcessing -> CYUCNB, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: IdAfterProcessing -> CYUFNB, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> ID, type: Int32



As you can see NHibernate.Cfg.Biner is trying to bind [Id] property twice (Ref: the first and last statement). The very first time, it seems to be doing it right, but the last statement seems odd!!!

I'm not sure at this point why! I checked my code again and again and didn't find two declarations of the Id property!

Hope this helps

Sandeep


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 7:05 pm 
Newbie

Joined: Thu Nov 16, 2006 4:17 pm
Posts: 5
Hello k-dub,

Thanks for your help, but after looking at the log4net log one more time I realised my mistake...

Code:

2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> CYANNC, CYA0CE, type: CoilProcessHistoryKey
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillProduct -> CYN0CD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CoilTypeCode -> CYQCCD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillCoilId -> CYAAND, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: BuildingCode -> CYQVCD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColumnNumber -> CYZRNU, type: Int32
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillRow -> CYQWCD, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillPosition -> CYZSNU, type: Int32
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ColdMillQualityCode -> CYAACE, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateDate -> CYALDT, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateTime -> CYABTM, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateUser -> CYABVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: CreateProgram -> CYACVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeDate -> CYAMDT, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeTime -> CYACTM, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeUser -> CYADVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: ChangeProgram -> CYAEVN, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: RecordStatus -> CYAEST, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: DatePutInLocation -> CYFTDT, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: PostedStatus -> CYAWSS, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: EditedStatus -> CYAXSS, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: PrintedStatus -> CYZ2SS, type: String
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: DataEntryBatchNumber -> CYBFNC, type: Int32
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: GaugeAfterProcessing -> CYUANB, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: WidthAfterProcessing -> CYUCNB, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: IdAfterProcessing -> CYUFNB, type: Double
2006-11-16 04:37:21 PM [772] DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> ID, type: Int32



As you can see NHibernate.Cfg.Biner is trying to bind [Id] property twice (Ref: the first and last statement). The very first time, it seems to be doing it right, but the last statement seems odd!!!

And sure it was, I was delcaring <composit-id> and <id> in the .hbm.xml file.

Hope this helps

Sandeep


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 06, 2009 3:07 pm 
Newbie

Joined: Fri Feb 06, 2009 3:04 pm
Posts: 1
I am also dealing with a table requiring the use of a composite-id. Does anyone know where I could find a good code example for this? If not, would anyone be willing to share some of their own code? My problem is in the implementation of the class that will represent the object behind the ID property of my entity class.

Thanks,

DF


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.