|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Handling illegal column names
Hi all, I'm rewriting a PHP application in Java and have come across a problem with the legacy MySQL database. Given the complexity of the data model, I'd like to use dbunit to setup test data, but they have used a reserved word (Primary) as a column name in one of the tables. When loading the data I get an invalid SQL statement exception because of the reserved word. Obviously the original app used backticks in the hand coded SQL queries to escape the invalid column name. And changing the column name impacts other systems, so that's a last resort. Is there any way to get dbunit to handle this situation? Thanx ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
|
|
Re: Handling illegal column namesI think a simple "solution" could be to copy this table to another
one, change the column name and setup dbUnit with this new table.
Perhaps you could create a view of this table too, but this would involve some dbunit configuration. best regards. mario h.c.t. On Mon, Jun 2, 2008 at 6:47 PM, rdietz <rdietz@...> wrote:
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
| Free Forum Powered by Nabble | Forum Help |