Docs » Components » Objectstores » Sql
These notes provided by Jason Richardson (see ISIS-223); many thanks.
The following details what POM entries and isis.properties need to be updated to use the SQL Objectstore from the quick start archetype.
I did this using the ISIS quickstart version: 0.2.0-incubating.
isis.persistor.sql.jdbc.connection): jdbc:postgresql://host:port/databaseAdd the following entry in your projectname-objstore-dflt POM file
<dependency>
<groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
<artifactId>sql-impl</artifactId>
</dependency>
Add the maven dependencies for your Database Drivers entry in your projectname-objstore-dflt POM file
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.0-801.jdbc3</version>
</dependency>
isis.propertiesIn the projectname-webapp project in the isis.properties file change the isis.persistor property
isis.persistor=sql
In the projectname-webapp project add the following properties (suitable for your Database Platform):
isis.persistor.sql.jdbc.driver=org.postgresql.Driver isis.persistor.sql.jdbc.connection=jdbc:postgresql://127.0.0.1:5432/assignments isis.persistor.sql.jdbc.user=postgres isis.persistor.sql.jdbc.password=TheDatabasePassword # PostgreSQL ISIS specific data type overides isis.persistor.sql.datatypes.timestamp=TIMESTAMP isis.persistor.sql.datatypes.datetime=TIMESTAMP isis.persistor.sql.datatypes.double=DOUBLE PRECISION
Do a maven clean and install on your main project and run it. You should see new table(s) created in your database.