From version 0.2 on there will be a business object based locking. Version 0.1.x has no locking concept implemented.
Note | |
---|---|
Note that there is for reason no optimistic, pessimistic or logical locking of data. So if the same objects (projects, persons, companies, ...) for one user are requested for change (e.g. if more user share the same user id like in the test application or public objects are shared within the application), the first will "win", the other will be notified, that the object has been changed by another user. |
There are databases which don't support transactions and foreign key constraints.
Its strongly recommended that you use transactions and support for foreign key constraints. The application relies on the referential integrity of the database to stay in a consistent stage. If there is no support by the database the application might get corrupt or inconsistent (because table entries will be able to delete which still are foreign keys in other tables)
MySQLs standard table type MYISAM has no support for transactions and foreign key constraints (at least up to version 4.x). You have to use the INNODB table type by either defining default-table-type=INNODB as the standard table type or by explicitly setting the table type in the create table .. statement.
If you can't change the standard table type property you have to manually create the tables as follows:
-
Use the setup page as described in Section 3.3, “Persistance Layer (Hibernate)”.
-
If the Initialize Database action was successful you will see the SQL statements on the page. Just copy them and add at the end of each table statement TYPE=InnoDB.
-
Go the MySQL console or any other program where you can execute SQL statements and execute all of them (drop, create, alter table).
In some circumstances you might get SocketExceptions using MySQL. This is a common issue of the standard driver properties from the MySQL JDBC driver.
You can solve this problem by usinge the autoReconnect property within your Hiberate configuration.
DB Url: jdbc:mysql://localhost/test?autoReconnect=true
If you encounter problems with values read from the database and "special characters" e.g. german "Umlaute" you need to add addtitional parameters to your JDBC url for MySQL.
The standard encoding for this application is UTF-8. MySQL/ JDBC JConnector has problems with storing UTF-8 values. Try to specify the encoding directly in the JDBC URL, via the useUnicode and characterEncoding MySQL JDBC driver properties:
DB Url: jdbc:mysql://localhost/test?autoReconnect=true&useUncicode=true&characterEncoding=ISO-8859-1