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.  [ 2 posts ] 
Author Message
 Post subject: Disable hbm2ddl for some mapping classes
PostPosted: Tue Jan 13, 2009 12:31 pm 
Newbie

Joined: Tue Jan 13, 2009 12:20 pm
Posts: 1
Hello to everybody,

I'm just trying to map a MySql - View with hibernate. It works fine, but there is still a little problem I would like to have fixed.

The hbm2ddl.auto is set to 'update'. So hibernate wants to create the table (view) on server-startup and it brings out the following error messages in catalina.out:

ERROR 2009-01-13 16:47:54,765 [main] org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table V_EXAMPLE(...) type=InnoDB
ERROR 2009-01-13 16:47:54,765 [main] org.hibernate.tool.hbm2ddl.SchemaUpdate - Table 'V_EXAMPLE' already exists

Is there any possibility to map a entity-class with a DB-view without ddl?

p.s: I need the hbm2ddl for the other entity-classes =)


Regards
dusty


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 13, 2009 5:07 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
SchemaUpdate is an all or nothing endeavor. Also, it's not recommended for production situations so take that into consideration :) If you feel adventurous, you could file a feature request JIRA for some annotation/config that disables schema update for certain entities....

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.