How do we create a schema, or reset the database, from the entities created in roo? It seems when I run "perform tests" it creates a schema and populates it with test data. Though it would be nice if that test data rolled back after testing...
So I could create the schema or reset my database with "perform tests" but then I have to delete the test data from all the tables...
Now I added a PersistentLogins entity for the remember-me functionality:
Code:
entity --class ~.domain.PersistentLogins --testAutomatically --identifierField series --identifierType java.lang.String --identifierColumn series
field string --fieldName username --notNull --sizeMax 64
field string --fieldName token --notNull --sizeMax 64
field date --fieldName lastUsed --type java.util.Date --persistenceType JPA_TIMESTAMP --notNull
I get no errors when adding PersistentLogins, but it doesn't actually create any tables in MySQL... Running "perform tests" causes a test failure for that entity alone:
Code:
Running de.elegantco.domain.PersistentLoginsIntegrationTest
Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 0.136 sec <<< FAILURE!
In surefire-reports:
Code:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dev.persistent_logins' doesn't exist
So I guess I have 2 questions:
- How do I create a schema file or at least reset the database?
- Why isn't my PersistentLogins entity creating a table?