-->
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: Prefilling table upon its creation?
PostPosted: Mon Jan 22, 2007 10:25 am 
Newbie

Joined: Mon Jan 22, 2007 10:16 am
Posts: 5
Hello!

Here's my problem - I have a table, that I would like to prefill with some fixed data via some hibernate mapping file or something. So, whenever the table does not exist or is empty, it is created and prefilled with some data.

The only thing I can think of that might something to do with my problem, is <database-object> in the Hibernate manual (5.7. Auxiliary Database Objects). But I'd need a concrete example, how to insert data through hibernate files.

If this is a dumb question, just punch me in the face and I'll keep looking for the answer... :)

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 22, 2007 10:41 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
put an /import.sql in classpath and it will do it automatically.

_________________
Max
Don't forget to rate


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.