-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Creating Cached Table with Hibernate2.1.7
PostPosted: Thu Dec 16, 2004 6:53 am 
Newbie

Joined: Thu Dec 16, 2004 6:47 am
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.