You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project using Sybase.
When I tried to use spring-dbunit, I run into a glitch, because the table has Identity columns, According to DBUnit FAQ(http://dbunit.sourceforge.net/components.html#InsertIdentityOperation), 'InsertIdentityOperation' should be used for the table.
I looked for a kind of com.excilys.ebi.spring.dbunit.config. DBOperation which uses 'InsertIdentityOperation', but I couldn't.
Does spring-dbunit have some kind of DBOperation supports 'InsertIdentityOperation' ?
If you don't, should I revise DBOpeation.java like the below?
If the codes aren't enough to fix the glitch, please let me know.
Step2. add below codes to DBOperation#getDatabaseOperation method.
I'm sure the code should be refactored.
public DatabaseOperation getDatabaseOperation() {
// for instance
if (this == INSERT_IDENTITY_INSERT) {
return InsertIdentityOperation.INSERT
}
// .. go on or
I'm working on a project using Sybase.
When I tried to use spring-dbunit, I run into a glitch, because the table has Identity columns, According to DBUnit FAQ(http://dbunit.sourceforge.net/components.html#InsertIdentityOperation), 'InsertIdentityOperation' should be used for the table.
I looked for a kind of com.excilys.ebi.spring.dbunit.config. DBOperation which uses 'InsertIdentityOperation', but I couldn't.
Does spring-dbunit have some kind of DBOperation supports 'InsertIdentityOperation' ?
If you don't, should I revise DBOpeation.java like the below?
If the codes aren't enough to fix the glitch, please let me know.
Step1 add below to DBOperation.
INSERT_IDENTITY_CLEAN_INSERT
INSERT_IDENTITY_INSERT
INSERT_IDENTITY_UPDATE
INSERT_IDENTITY_REFRESH
Step2. add below codes to DBOperation#getDatabaseOperation method.
public DatabaseOperation getDatabaseOperation() {
// for instance
if (this == INSERT_IDENTITY_INSERT) {
return InsertIdentityOperation.INSERT
}
// .. go on or
}
The text was updated successfully, but these errors were encountered: