Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about support InsertIdentityOperation #40

Open
hljklsgfag opened this issue Nov 21, 2014 · 2 comments
Open

about support InsertIdentityOperation #40

hljklsgfag opened this issue Nov 21, 2014 · 2 comments

Comments

@hljklsgfag
Copy link

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.

  • I'm sure the code should be refactored.

public DatabaseOperation getDatabaseOperation() {
// for instance
if (this == INSERT_IDENTITY_INSERT) {
return InsertIdentityOperation.INSERT
}
// .. go on or

return DatabaseOperation.class.cast(operations.asObject(name()));

}

@rsertelon
Copy link
Contributor

Just an update to let you know that I can't have a look right now. But will. Thanks for your patience. ;)

@hljklsgfag
Copy link
Author

I'm sorry for my late reply, and thanks for your kindly reply.
I'm looking forward to the update for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants