|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
PROPERTY_TABLE_TYPETeam, can anyone show me how to use the argument to setup
PROPERTY_TABLE_TYPE to view or materialized view? Is dbunit able to extract data from views and materialized views? thanks. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
|
|
Re: PROPERTY_TABLE_TYPEI'm not sure I understand this question.
DbUnit has two main purposes: 1) to prime the database with test data before a test. This has no meaning with regard to a view, although obviously DbUnit cna prime data in tables underlying a view. It might be possible to use DbUnit to prime a materialized view directly, but I don't see why you would want to do that ... 2) to verify database content after a test. This could apply to a materialized view. In fact I often use DbUnit to assert contents of ordinary views, to test non-trivial view logic. The same approach could apply to materialized views. My steps are: - Prime the table(s) underlying the view - Use DbUnit's table assertion mechanism, to compare an ITable contents to the result of an SQL query against the view. I've found this technique very valuable for testing non-trivial view logic. Regards John Hurst Wellington, New Zealand On Thu, Sep 3, 2009 at 3:24 AM, Bing He <bingsaber@...> wrote: Team, can anyone show me how to use the argument to setup -- COH: Level 10 US ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
|
|
|
|
|
Re: PROPERTY_TABLE_TYPEWhoops, I didn't understand the question. Sorry about that. John Hurst On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <Matthias.Gommeringer@...> wrote: ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
|
|
Re: PROPERTY_TABLE_TYPEThanks so much for your quick response John and Matthias.
I just tried with the syntax and got the following exception. Should I log a jira:))???? org.dbunit.dataset.DataSetException: table=LINES_ITEMS_MV, row=0, column=LI_RID, value=oracle.sql.ROWID@267e7c at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:217) at org.dbunit.dataset.stream.DataSetProducerAdapter.produce(DataSetProducerAdapter.java:104) at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:124) at org.dbunit.dataset.xml.FlatXmlDataSet.write(FlatXmlDataSet.java:341) at play.IReportDataSetGen.exportData(IReportDataSetGen.java:68) at play.IReportDataSetGen.testRateTypeOrdinal(IReportDataSetGen.java:108) 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:585) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: org.dbunit.dataset.datatype.TypeCastException: Unable to typecast value <oracle.sql.ROWID@267e7c> of type <oracle.sql.ROWID> to VARCHAR at org.dbunit.dataset.datatype.StringDataType.typeCast(StringDataType.java:132) at org.dbunit.dataset.datatype.DataType.asString(DataType.java:159) at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:212) ... 24 more On Wed, Sep 2, 2009 at 2:20 PM, John Hurst<john.b.hurst@...> wrote: > Whoops, I didn't understand the question. Sorry about that. > > John Hurst > > On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <Matthias.Gommeringer@...> > wrote: > > This should do the job, at least for loading: > > DatabaseConnection conn = new DatabaseConnection(...); > String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"}; > conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE, > types); > > HTH > rgds, > matthias > >> -----Ursprüngliche Nachricht----- >> Von: "Bing He" <bingsaber@...> >> Gesendet: 02.09.09 17:34:54 >> An: dbunit-user@... >> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE > >> Team, can anyone show me how to use the argument to setup > >> PROPERTY_TABLE_TYPE to view or mater... > > ______________________________________________________ > GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://movieflat.web.de > > ------------------------------------------------------------------------------ > Let Crystal Reports... > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > dbunit-user mailing list > dbunit-user@... > https://lists.sourceforge.net/lists/listinfo/dbunit-user > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
|
|
|
|
|
|
|
|
Re: PROPERTY_TABLE_TYPEThanks so much Matthias. I will let you know once I tested it.
Regards, Bing On Wed, Sep 2, 2009 at 4:33 PM, Matthias Gommeringer<Matthias.Gommeringer@...> wrote: > I debugged this problem and it is actually easier than I thought: there is no need to create a new datatype. I extended the oracle datatype factory so that the rowid is handled as string which works fine on my local machine. THe change is committed on the current trunk rev 1030. Please checkout from SVN and create the jar file via maven and let me know if it works properly for you as well. > > thx and regards, > matthias > > >> -----Ursprüngliche Nachricht----- >> Von: "Bing He" <bingsaber@...> >> Gesendet: 02.09.09 21:29:13 >> An: dbunit-user@... >> Betreff: Re: [dbunit-user] PROPERTY_TABLE_TYPE > > >> Thanks so much for your quick response John and Matthias. >> >> I just tried with the syntax and got the following exception. Should I >> log a jira:))???? >> >> org.dbunit.dataset.DataSetException: table=LINES_ITEMS_MV, row=0, >> column=LI_RID, value=oracle.sql.ROWID@267e7c >> at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:217) >> at org.dbunit.dataset.stream.DataSetProducerAdapter.produce(DataSetProducerAdapter.java:104) >> at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:124) >> at org.dbunit.dataset.xml.FlatXmlDataSet.write(FlatXmlDataSet.java:341) >> at play.IReportDataSetGen.exportData(IReportDataSetGen.java:68) >> at play.IReportDataSetGen.testRateTypeOrdinal(IReportDataSetGen.java:108) >> 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:585) >> at junit.framework.TestCase.runTest(TestCase.java:168) >> at junit.framework.TestCase.runBare(TestCase.java:134) >> at junit.framework.TestResult$1.protect(TestResult.java:110) >> at junit.framework.TestResult.runProtected(TestResult.java:128) >> at junit.framework.TestResult.run(TestResult.java:113) >> at junit.framework.TestCase.run(TestCase.java:124) >> at junit.framework.TestSuite.runTest(TestSuite.java:232) >> at junit.framework.TestSuite.run(TestSuite.java:227) >> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) >> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) >> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) >> Caused by: org.dbunit.dataset.datatype.TypeCastException: Unable to >> typecast value <oracle.sql.ROWID@267e7c> of type <oracle.sql.ROWID> to >> VARCHAR >> at org.dbunit.dataset.datatype.StringDataType.typeCast(StringDataType.java:132) >> at org.dbunit.dataset.datatype.DataType.asString(DataType.java:159) >> at org.dbunit.dataset.xml.FlatXmlWriter.row(FlatXmlWriter.java:212) >> ... 24 more >> >> >> >> On Wed, Sep 2, 2009 at 2:20 PM, John Hurst<john.b.hurst@...> wrote: >> > Whoops, I didn't understand the question. Sorry about that. >> > >> > John Hurst >> > >> > On Sep 3, 2009 7:16 AM, "Matthias Gommeringer" <Matthias.Gommeringer@...> >> > wrote: >> > >> > This should do the job, at least for loading: >> > >> > DatabaseConnection conn = new DatabaseConnection(...); >> > String[] types = new String[]{"TABLE", "VIEW", "MATERIALIZED VIEW"}; >> > conn.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE, >> > types); >> > >> > HTH >> > rgds, >> > matthias >> > >> >> -----Ursprüngliche Nachricht----- >> >> Von: "Bing He" <bingsaber@...> >> >> Gesendet: 02.09.09 17:34:54 >> >> An: dbunit-user@... >> >> Betreff: [dbunit-user] PROPERTY_TABLE_TYPE >> > >> >> Team, can anyone show me how to use the argument to setup > >> >> PROPERTY_TABLE_TYPE to view or mater... >> > >> > ______________________________________________________ >> > GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! >> > Jetzt freischalten unter http://movieflat.web.de >> > >> > ------------------------------------------------------------------------------ >> > Let Crystal Reports... >> > >> > ------------------------------------------------------------------------------ >> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> > trial. Simplify your report design, integration and deployment - and focus >> > on >> > what you do best, core application coding. Discover what's new with >> > Crystal Reports now. http://p.sf.net/sfu/bobj-july >> > _______________________________________________ >> > dbunit-user mailing list >> > dbunit-user@... >> > https://lists.sourceforge.net/lists/listinfo/dbunit-user >> > >> > >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> dbunit-user mailing list >> dbunit-user@... >> https://lists.sourceforge.net/lists/listinfo/dbunit-user >> > > > ________________________________________________________________ > Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate > für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/ > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > dbunit-user mailing list > dbunit-user@... > https://lists.sourceforge.net/lists/listinfo/dbunit-user > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
| Free embeddable forum powered by Nabble | Forum Help |