Hello Ben,
  thanks a lot for your reply...
Does this work OK outside DBUnit? What is the exception and stack track?

just for clarify. tables work just fine (and whole acegi infrastructure)

error happens because i am importing a database (as excel sheet) using
dbunit.
in order to do that (and void duplicate key exception) i need to delete it first,
using  dbunit's DatabaseOperation.DELETE_ALL

this code will delete every data in the tables of my db (which includes also acegi's tables)

but that operation will raise an exception if there is no primary key associated with a tabl
and that's why i posted my issue to acegi...

if setting a primary key on AUTHORITES table could potentially cause problems, then i'll go back
to dbunit formus and see whch workaround needs to be done..


 

Just a tip regarding DBUnit, what I find often works in applications is
to use something like an InitializingBean to seed the database
(generally via the services layer, although by a JdbcTemplate etc would
be fine as well), and then use AbstractTransactionalSpringContextTests
to run your tests but not commit the changes they make. In applications
I've been involved in, this largely avoids the need for heavy management
of database state.

yep i was doing it (in fact my initialization bean is copied from acegi sampel application)

thanks in advance and regards
 marco


 

Cheers
Ben


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to