mysql - Auto creation of database tables using JDO -
i new jdo , mysql. in project, want entities should converted in table automatically.
i had start using jdo , defined properties this,
javax.jdo.persistencemanagerfactoryclass=org.datanucleus.api.jdo.jdopersistencemanagerfactory datanucleus.autocreateschema=true datanucleus.validatetables=false datanucleus.validateconstraints=false datanucleus.query.sql.allowall = true javax.jdo.option.connectiondrivername=com.mysql.jdbc.driver javax.jdo.option.connectionurl=jdbc:mysql://127.0.0.1:3306/db_name javax.jdo.option.connectionusername=user javax.jdo.option.connectionpassword=123456 javax.jdo.option.mapping=hsql
sample entity:
@persistencecapable(identitytype = identitytype.application, table = "heartbeat") public class heartbeat implements serializable{ @primarykey @column(length=128) private string userid; ....... }
now, when compile or run application tables not being auto created. not sure property should use auto creation of tables based on entities created.
please bear question new jdo , mysql integration.
thanks in advance.
Comments
Post a Comment