-->
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: hbm2ddl.import_files seems don't work??, not found in log
PostPosted: Thu May 03, 2012 2:33 am 
Newbie

Joined: Thu May 03, 2012 2:16 am
Posts: 1
Hi I have a issue respect a hbm2ddl.import_files, it seems that don't work and not doesn't appear in the log.
this is my configuration:
Code:
<property name="hibernateProperties">
            <value>
                hibernate.dialect=${hibernate.dialect}
                hibernate.default_schema=${hibernate.default_schema}
                hibernate.jdbc.batch_size=${hibernate.jdbc.batch_size}
                hibernate.show_sql=${hibernate.show_sql}
                hibernate.hbm2ddl.auto=${hibernate.hbm2ddl.auto}
                hibernate.id.new_generator_mappings=${hibernate.id.new_generator_mappings}
                hibernate.hbm2ddl.import_files=${hibernate.hbm2ddl.import_files}
                <!-- Auto Generated Schemas and tables not good for production
                hibernate.hbm2ddl.auto=update-->
             </value>
        </property>

the hibernate.hbm2ddl.import_files=/import.sql, and the file is:
Code:
insert into DEPARTAMENTO (NOMBRE_DEPART,REFERENCIA_DEPART) values ('AMAZONAS')

My jdbc.properties:
Code:
#org.hibernate.dialect.PostgreSQLDialect
    hibernate.default_schema = "DBMERCANCIAS"
    hibernate.show_sql = true
    hibernate.id.new_generator_mappings = true
    hibernate.hbm2ddl.auto = create
    hibernate.jdbc.batch_size = 5
    #Default the factory to use to instantiate transactions     org.transaction.JDBCTransactionFactory
    hibernate.transaction.factory_class=org.transaction.JDBCTransactionFactory
    #Initialize values statements only on create-drop or create
    hibernate.hbm2ddl.import_files = /import.sql   

The database is postgresql 9.1.1, spring 3.1.0.RELEASE and hibernate 4.1.2.Final, the hibernate.hbm2ddl.auto is set to "create", the tables and the schema create but not run sql command insert why?, I can see in the log where this command run.


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.