Note that there are some explanatory texts on larger screens.

plurals
  1. POjava se with hibernate and JavaDB. How do i deploy application?
    primarykey
    data
    text
    <p>1)When i send my application to my teacher, how do i tell it to create some empty tables and populate it with sample data on FIRST launch of application? I know that i can include sql script with my files or something. Can i instruct hibrenate to create empty tables? I have my entities which i use in my application.</p> <p>2)When my ide (NetNeans) starts, i go to services and start my db (JavaDB) manually, because if i dont, on application startup hibernate complains that he cant connect. How do i tell hibernate start to start db (its on localhost:1527)?</p> <p>my hebernate.cfg:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt; &lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.DerbyDialect&lt;/property&gt; &lt;property name="hibernate.connection.driver_class"&gt;org.apache.derby.jdbc.ClientDriver&lt;/property&gt; &lt;property name="hibernate.connection.url"&gt;jdbc:derby://localhost:1527/sample&lt;/property&gt; &lt;property name="hibernate.connection.username"&gt;app&lt;/property&gt; &lt;property name="hibernate.connection.password"&gt;app&lt;/property&gt; &lt;property name="hibernate.show_sql"&gt;true&lt;/property&gt; &lt;property name="hibernate.query.factory_class"&gt;org.hibernate.hql.classic.ClassicQueryTranslatorFactory&lt;/property&gt; &lt;mapping resource="entity/PurchaseOrder.hbm.xml"/&gt; &lt;mapping resource="entity/Customer.hbm.xml"/&gt; &lt;mapping resource="entity/ProductCode.hbm.xml"/&gt; &lt;mapping resource="entity/Product.hbm.xml"/&gt; &lt;mapping resource="entity/MicroMarket.hbm.xml"/&gt; &lt;mapping resource="entity/Manufacturer.hbm.xml"/&gt; &lt;mapping resource="entity/DiscountCode.hbm.xml"/&gt; &lt;/session-factory&gt; &lt;/hibernate-configuration&gt; </code></pre> <p>I dont have good knoledge in english and its hard to form query in google. Just tell me how those functions called (if they exsist).</p> <p>Any help would be appreciated. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload