Is it acceptable to make changes to standard Spring Security table fields?
http://static.springsource.org/spring-security/site/docs/3.0.x/reference/appendix-schema.html
In, particularly, Hibernate required me to add id field for these tables:
users
authorities
exception:
org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): model.Authorities
That means,that I should add id fields to my model beans and following config to *hbm.xml:
<id name="id">
<generator class="assigned"/>
</id>
What is the best practice?
Should I change Spring Security DB table structure or somehow deal with Hibernate?
It’s fine as long as SQL queries issued by
JdbcDaoImplare not affected. And even if you need to change these queries, you can do it by configuringJdbcDaoImplappropriately.However, perhaps it would be better to create a custom implementation of
UserDetailsServicethat would reuse your DAOs to load user information, and configure Spring Security to use it as