📄 toolset_guide.pot
字号:
" <column name=\"bal\">\n" " <comment>Balance in USD</comment>\n" " </column>\n" "</property>]]>"msgstr ""#. Tag: para#: toolset_guide.xml:275#, no-c-formatmsgid "This results in a <literal>comment on table</literal> or <literal>comment on column</literal> statement in the generated DDL (where supported)."msgstr ""#. Tag: title#: toolset_guide.xml:284#, no-c-formatmsgid "Running the tool"msgstr ""#. Tag: para#: toolset_guide.xml:286#, no-c-formatmsgid "The <literal>SchemaExport</literal> tool writes a DDL script to standard out and/or executes the DDL statements."msgstr ""#. Tag: para#: toolset_guide.xml:291#, no-c-formatmsgid "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaExport</literal> <emphasis>options mapping_files</emphasis>"msgstr ""#. Tag: title#: toolset_guide.xml:297#, no-c-formatmsgid "<literal>SchemaExport</literal> Command Line Options"msgstr ""#. Tag: entry#: toolset_guide.xml:303 toolset_guide.xml:453 toolset_guide.xml:522#, no-c-formatmsgid "Option"msgstr ""#. Tag: entry#: toolset_guide.xml:304 toolset_guide.xml:391 toolset_guide.xml:454 toolset_guide.xml:523#, no-c-formatmsgid "Description"msgstr ""#. Tag: literal#: toolset_guide.xml:309 toolset_guide.xml:459#, no-c-formatmsgid "--quiet"msgstr ""#. Tag: entry#: toolset_guide.xml:310 toolset_guide.xml:460#, no-c-formatmsgid "don't output the script to stdout"msgstr ""#. Tag: literal#: toolset_guide.xml:313#, no-c-formatmsgid "--drop"msgstr ""#. Tag: entry#: toolset_guide.xml:314#, no-c-formatmsgid "only drop the tables"msgstr ""#. Tag: literal#: toolset_guide.xml:317#, no-c-formatmsgid "--create"msgstr ""#. Tag: entry#: toolset_guide.xml:318#, no-c-formatmsgid "only create the tables"msgstr ""#. Tag: literal#: toolset_guide.xml:321 toolset_guide.xml:463#, no-c-formatmsgid "--text"msgstr ""#. Tag: entry#: toolset_guide.xml:322#, no-c-formatmsgid "don't export to the database"msgstr ""#. Tag: literal#: toolset_guide.xml:325#, no-c-formatmsgid "--output=my_schema.ddl"msgstr ""#. Tag: entry#: toolset_guide.xml:326#, no-c-formatmsgid "output the ddl script to a file"msgstr ""#. Tag: literal#: toolset_guide.xml:329 toolset_guide.xml:467 toolset_guide.xml:528#, no-c-formatmsgid "--naming=eg.MyNamingStrategy"msgstr ""#. Tag: entry#: toolset_guide.xml:330 toolset_guide.xml:468 toolset_guide.xml:529#, no-c-formatmsgid "select a <literal>NamingStrategy</literal>"msgstr ""#. Tag: literal#: toolset_guide.xml:333 toolset_guide.xml:475 toolset_guide.xml:536#, no-c-formatmsgid "--config=hibernate.cfg.xml"msgstr ""#. Tag: entry#: toolset_guide.xml:334#, no-c-formatmsgid "read Hibernate configuration from an XML file"msgstr ""#. Tag: literal#: toolset_guide.xml:337 toolset_guide.xml:471 toolset_guide.xml:532#, no-c-formatmsgid "--properties=hibernate.properties"msgstr ""#. Tag: entry#: toolset_guide.xml:338 toolset_guide.xml:472 toolset_guide.xml:533#, no-c-formatmsgid "read database properties from a file"msgstr ""#. Tag: literal#: toolset_guide.xml:341#, no-c-formatmsgid "--format"msgstr ""#. Tag: entry#: toolset_guide.xml:342#, no-c-formatmsgid "format the generated SQL nicely in the script"msgstr ""#. Tag: literal#: toolset_guide.xml:345#, no-c-formatmsgid "--delimiter=;"msgstr ""#. Tag: entry#: toolset_guide.xml:346#, no-c-formatmsgid "set an end of line delimiter for the script"msgstr ""#. Tag: para#: toolset_guide.xml:352#, no-c-formatmsgid "You may even embed <literal>SchemaExport</literal> in your application:"msgstr ""#. Tag: programlisting#: toolset_guide.xml:356#, no-c-formatmsgid "" "<![CDATA[Configuration cfg = ....;\n" "new SchemaExport(cfg).create(false, true);]]>"msgstr ""#. Tag: title#: toolset_guide.xml:361#, no-c-formatmsgid "Properties"msgstr ""#. Tag: para#: toolset_guide.xml:363#, no-c-formatmsgid "Database properties may be specified"msgstr ""#. Tag: para#: toolset_guide.xml:369#, no-c-formatmsgid "as system properties with <literal>-D</literal><emphasis><property></emphasis>"msgstr ""#. Tag: para#: toolset_guide.xml:372#, no-c-formatmsgid "in <literal>hibernate.properties</literal>"msgstr ""#. Tag: para#: toolset_guide.xml:375#, no-c-formatmsgid "in a named properties file with <literal>--properties</literal>"msgstr ""#. Tag: para#: toolset_guide.xml:379#, no-c-formatmsgid "The needed properties are:"msgstr ""#. Tag: title#: toolset_guide.xml:384#, no-c-formatmsgid "SchemaExport Connection Properties"msgstr ""#. Tag: entry#: toolset_guide.xml:390#, no-c-formatmsgid "Property Name"msgstr ""#. Tag: literal#: toolset_guide.xml:396#, no-c-formatmsgid "hibernate.connection.driver_class"msgstr ""#. Tag: entry#: toolset_guide.xml:397#, no-c-formatmsgid "jdbc driver class"msgstr ""#. Tag: literal#: toolset_guide.xml:400#, no-c-formatmsgid "hibernate.connection.url"msgstr ""#. Tag: entry#: toolset_guide.xml:401#, no-c-formatmsgid "jdbc url"msgstr ""#. Tag: literal#: toolset_guide.xml:404#, no-c-formatmsgid "hibernate.connection.username"msgstr ""#. Tag: entry#: toolset_guide.xml:405#, no-c-formatmsgid "database user"msgstr ""#. Tag: literal#: toolset_guide.xml:408#, no-c-formatmsgid "hibernate.connection.password"msgstr ""#. Tag: entry#: toolset_guide.xml:409#, no-c-formatmsgid "user password"msgstr ""#. Tag: literal#: toolset_guide.xml:412#, no-c-formatmsgid "hibernate.dialect"msgstr ""#. Tag: entry#: toolset_guide.xml:413#, no-c-formatmsgid "dialect"msgstr ""#. Tag: title#: toolset_guide.xml:422#, no-c-formatmsgid "Using Ant"msgstr ""#. Tag: para#: toolset_guide.xml:424#, no-c-formatmsgid "You can call <literal>SchemaExport</literal> from your Ant build script:"msgstr ""#. Tag: programlisting#: toolset_guide.xml:428#, no-c-formatmsgid "" "<![CDATA[<target name=\"schemaexport\">\n" " <taskdef name=\"schemaexport\"\n" " classname=\"org.hibernate.tool.hbm2ddl.SchemaExportTask\"\n" " classpathref=\"class.path\"/>\n" " \n" " <schemaexport\n" " properties=\"hibernate.properties\"\n" " quiet=\"no\"\n" " text=\"no\"\n" " drop=\"no\"\n" " delimiter=\";\"\n" " output=\"schema-export.sql\">\n" " <fileset dir=\"src\">\n" " <include name=\"**/*.hbm.xml\"/>\n" " </fileset>\n" " </schemaexport>\n" "</target>]]>"msgstr ""#. Tag: title#: toolset_guide.xml:433#, no-c-formatmsgid "Incremental schema updates"msgstr ""#. Tag: para#: toolset_guide.xml:435#, no-c-formatmsgid "The <literal>SchemaUpdate</literal> tool will update an existing schema with \"incremental\" changes. Note that <literal>SchemaUpdate</literal> depends heavily upon the JDBC metadata API, so it will not work with all JDBC drivers."msgstr ""#. Tag: para#: toolset_guide.xml:441#, no-c-formatmsgid "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaUpdate</literal> <emphasis>options mapping_files</emphasis>"msgstr ""#. Tag: title#: toolset_guide.xml:447#, no-c-formatmsgid "<literal>SchemaUpdate</literal> Command Line Options"msgstr ""#. Tag: entry#: toolset_guide.xml:464#, no-c-formatmsgid "don't export the script to the database"msgstr ""#. Tag: entry#: toolset_guide.xml:476 toolset_guide.xml:537#, no-c-formatmsgid "specify a <literal>.cfg.xml</literal> file"msgstr ""#. Tag: para#: toolset_guide.xml:482#, no-c-formatmsgid "You may embed <literal>SchemaUpdate</literal> in your application:"msgstr ""#. Tag: programlisting#: toolset_guide.xml:486#, no-c-formatmsgid "" "<![CDATA[Configuration cfg = ....;\n" "new SchemaUpdate(cfg).execute(false);]]>"msgstr ""#. Tag: title#: toolset_guide.xml:491#, no-c-formatmsgid "Using Ant for incremental schema updates"msgstr ""#. Tag: para#: toolset_guide.xml:493#, no-c-formatmsgid "You can call <literal>SchemaUpdate</literal> from the Ant script:"msgstr ""#. Tag: programlisting#: toolset_guide.xml:497#, no-c-formatmsgid "" "<![CDATA[<target name=\"schemaupdate\">\n" " <taskdef name=\"schemaupdate\"\n" " classname=\"org.hibernate.tool.hbm2ddl.SchemaUpdateTask\"\n" " classpathref=\"class.path\"/>\n" " \n" " <schemaupdate\n" " properties=\"hibernate.properties\"\n" " quiet=\"no\">\n" " <fileset dir=\"src\">\n" " <include name=\"**/*.hbm.xml\"/>\n" " </fileset>\n" " </schemaupdate>\n" "</target>]]>"msgstr ""#. Tag: title#: toolset_guide.xml:502#, no-c-formatmsgid "Schema validation"msgstr ""#. Tag: para#: toolset_guide.xml:504#, no-c-formatmsgid "The <literal>SchemaValidator</literal> tool will validate that the existing database schema \"matches\" your mapping documents. Note that <literal>SchemaValidator</literal> depends heavily upon the JDBC metadata API, so it will not work with all JDBC drivers. This tool is extremely useful for testing."msgstr ""#. Tag: para#: toolset_guide.xml:510#, no-c-formatmsgid "<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <literal>org.hibernate.tool.hbm2ddl.SchemaValidator</literal> <emphasis>options mapping_files</emphasis>"msgstr ""#. Tag: title#: toolset_guide.xml:516#, no-c-formatmsgid "<literal>SchemaValidator</literal> Command Line Options"msgstr ""#. Tag: para#: toolset_guide.xml:543#, no-c-formatmsgid "You may embed <literal>SchemaValidator</literal> in your application:"msgstr ""#. Tag: programlisting#: toolset_guide.xml:547#, no-c-formatmsgid "" "<![CDATA[Configuration cfg = ....;\n" "new SchemaValidator(cfg).validate();]]>"msgstr ""#. Tag: title#: toolset_guide.xml:552#, no-c-formatmsgid "Using Ant for schema validation"msgstr ""#. Tag: para#: toolset_guide.xml:554#, no-c-formatmsgid "You can call <literal>SchemaValidator</literal> from the Ant script:"msgstr ""#. Tag: programlisting#: toolset_guide.xml:558#, no-c-formatmsgid "" "<![CDATA[<target name=\"schemavalidate\">\n" " <taskdef name=\"schemavalidator\"\n" " classname=\"org.hibernate.tool.hbm2ddl.SchemaValidatorTask\"\n" " classpathref=\"class.path\"/>\n" " \n" " <schemavalidator\n" " properties=\"hibernate.properties\">\n" " <fileset dir=\"src\">\n" " <include name=\"**/*.hbm.xml\"/>\n" " </fileset>\n" " </schemavalidator>\n" "</target>]]>"msgstr ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -