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.  [ 4 posts ] 
Author Message
 Post subject: Is there any flag to disable changes to the Db?create table?
PostPosted: Wed Apr 13, 2005 11:36 am 
Newbie

Joined: Wed Apr 13, 2005 11:25 am
Posts: 7
hi,
well i have this problem.i don`t want hibernate to make any changes to my database.
i just want to read from it.i don`t need to perform any changes nor create any new tables or constraints.
currently hibernate tries to make some changes but is not allowed! by the db administrator rights..
but i want to definitely take this right and never worry about it!
is there any flag or property in the general configuration that i could use???


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 13, 2005 12:11 pm 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
set FlushMode to "never" if you never want to write back to database[/img]

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 13, 2005 12:16 pm 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
1- If you dont want to save-or-update any data : Set FlushMode to never

2- If you dont want Hibernate to create tables and constraints manually,
fix your mapping!
Hibernate creates tables manually if you specify a "table" in the mapping that doesnt exist in the database.

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 13, 2005 12:21 pm 
Newbie

Joined: Wed Apr 13, 2005 11:25 am
Posts: 7
Well i can set this at run time when already in a session,but what about at start-up time when hibernate is reading the mappings???
the problem is i have one class split in two tables.i can`t change the data model not even touch it.so i create a view in the db and read from it.
hibernate tries to create the table with the same view name but obviously is not allowed to, at startup,because an object(my view) already exists!
but he can read from the view and load me the object.
is there any thing else than would disallow him changing in the db at start-up?


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

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.