Thanks for the reply, but I am having troubles implementing this.
Here is my mapping. Is this set up properly? There doesn't seem to be very much documentation on dynamic-components. Maybe I am just missing something?
Code:
<dynamic-component name="hour">
<property name="H1" column="H1" type="java.math.BigDecimal"/>
<property name="H2" column="H2" type="java.math.BigDecimal"/>
<property name="H3" column="H3" type="java.math.BigDecimal"/>
<property name="H4" column="H4" type="java.math.BigDecimal"/>
<property name="H5" column="H5" type="java.math.BigDecimal"/>
<property name="H6" column="H6" type="java.math.BigDecimal"/>
<property name="H7" column="H7" type="java.math.BigDecimal"/>
<property name="H8" column="H8" type="java.math.BigDecimal"/>
<property name="H9" column="H9" type="java.math.BigDecimal"/>
<property name="H10" column="H10" type="java.math.BigDecimal"/>
<property name="H11" column="H11" type="java.math.BigDecimal"/>
<property name="H12" column="H12" type="java.math.BigDecimal"/>
<property name="H13" column="H13" type="java.math.BigDecimal"/>
<property name="H14" column="H14" type="java.math.BigDecimal"/>
<property name="H15" column="H15" type="java.math.BigDecimal"/>
<property name="H16" column="H16" type="java.math.BigDecimal"/>
<property name="H17" column="H17" type="java.math.BigDecimal"/>
<property name="H18" column="H19" type="java.math.BigDecimal"/>
<property name="H20" column="H20" type="java.math.BigDecimal"/>
<property name="H21" column="H21" type="java.math.BigDecimal"/>
<property name="H22" column="H22" type="java.math.BigDecimal"/>
<property name="H23" column="H23" type="java.math.BigDecimal"/>
<property name="H24" column="H24" type="java.math.BigDecimal"/>
</dynamic-component>
Here is the blow up:
Code:
WARN [main] (JDBCExceptionReporter.java:57) - SQL Error: 904, SQLState: 42000
ERROR [main] (JDBCExceptionReporter.java:58) - ORA-00904: "H24": invalid identifier
WARN [main] (JDBCExceptionReporter.java:57) - SQL Error: 904, SQLState: 42000
ERROR [main] (JDBCExceptionReporter.java:58) - ORA-00904: "H24": invalid identifier
WARN [main] (JDBCExceptionReporter.java:57) - SQL Error: 904, SQLState: 42000
ERROR [main] (JDBCExceptionReporter.java:58) - ORA-00904: "H24": invalid identifier
WARN [main] (JDBCExceptionReporter.java:57) - SQL Error: 904, SQLState: 42000
ERROR [main] (JDBCExceptionReporter.java:58) - ORA-00904: "H24": invalid identifier
ERROR [main] (SessionImpl.java:2400) - Could not synchronize database state with session
ERROR [main] (BaseDAO.java:74) - Caught exception attempting BaseDAO.save:
net.sf.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:69)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at net.sf.hibernate.impl.BatcherImpl.convert(BatcherImpl.java:328)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:135)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2438)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at com.transalta.miso.model.dao.BaseDAO.save(BaseDAO.java:63)
at com.transalta.miso.model.dao.StlmtTypeDAO.save(StlmtTypeDAO.java:18)
at com.transalta.miso.model.dao.StlmtTypeDAOtest.testStlmtType(StlmtTypeDAOtest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by: java.sql.BatchUpdateException: ORA-00904: "H24": invalid identifier
at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:459)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:4210)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
... 22 more
Thanks!