Hibernate version:
Hibernate2.1.7
Mapping documents:
none
Code between sessionFactory.openSession() and session.close():
Transaction tx = session.beginTransaction();
User user = (User) session.load(User.class, userId);
Event theEvent = (Event) session.load(Event.class, eventId);
user.getFavouriteEvents().add(theEvent);
tx.commit();
Full stack trace of any exception that occurs:
-
Name and version of the database you are using:
HSQLDB1.7.3
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi all,
I was running your tutorial sample from
http://www.gloegl.de/15.html, and it works just fine.
The problem I have is that the test.data size is 0 KB, even after I run the EventManager class.
I notice that this is due to the table creation by Hibernate.
Hibernate generates the following code:
CREATE TABLE EVENTS(UID BIGINT NOT NULL PRIMARY KEY,DATE TIMESTAMP,EVENTTITLE VARCHAR(255))
Whereas if test.data is to increase its size, the table creation should've been:
CREATE CACHED TABLE EVENTS(UID BIGINT NOT NULL PRIMARY KEY,DATE TIMESTAMP,EVENTTITLE VARCHAR(255))
The problem I have is:
How to get Hibernate generate the table creation with the word "CACHED" in it?
Thanks