Assigning Default Catalog and Default Schema Property in Hibernate.cfg.xml

1,256 views
Skip to first unread message

vino

unread,
Feb 10, 2011, 6:16:28 AM2/10/11
to nhusers
Hi All,

In Hibernate.cfg.xml File How to assign
<property Name="Default Catalog"> and
<property Name="Default Schema"> values for Mysql And SqlLite Database

Thanks in Advance

Fabio Maulo

unread,
Feb 10, 2011, 12:17:25 PM2/10/11
to nhu...@googlegroups.com
try to add the nhibernate-configuration.xsd to de editor in Visual Studio


--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.




--
Fabio Maulo

vinoth v

unread,
Feb 10, 2011, 12:39:00 PM2/10/11
to nhu...@googlegroups.com
What Values need to assign for For both the Property

Fabio Maulo

unread,
Feb 10, 2011, 1:15:37 PM2/10/11
to nhu...@googlegroups.com
<xs:element name="property">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="connection.provider" />
<xs:enumeration value="connection.driver_class" />
<xs:enumeration value="connection.connection_string" />
<xs:enumeration value="connection.isolation" />
<xs:enumeration value="connection.release_mode" />
<xs:enumeration value="connection.connection_string_name" />
<xs:enumeration value="dialect" />
<xs:enumeration value="default_schema" />
<xs:enumeration value="show_sql" />
<xs:enumeration value="max_fetch_depth" />
<xs:enumeration value="current_session_context_class" />
<xs:enumeration value="transaction.factory_class" />
<xs:enumeration value="cache.provider_class" />
<xs:enumeration value="cache.use_query_cache" />
<xs:enumeration value="cache.query_cache_factory" />
<xs:enumeration value="cache.use_second_level_cache" />
<xs:enumeration value="cache.region_prefix" />
<xs:enumeration value="cache.use_minimal_puts" />
<xs:enumeration value="cache.default_expiration" />
<xs:enumeration value="query.substitutions" />
<xs:enumeration value="query.factory_class" />
<xs:enumeration value="query.imports" />
<xs:enumeration value="hbm2ddl.auto" />
<xs:enumeration value="hbm2ddl.keywords" />
<xs:enumeration value="sql_exception_converter" />
<xs:enumeration value="adonet.wrap_result_sets" />
<xs:enumeration value="prepare_sql" />
<xs:enumeration value="command_timeout" />
<xs:enumeration value="adonet.batch_size" />
<xs:enumeration value="use_proxy_validator" />
<xs:enumeration value="use_outer_join" />
<xs:enumeration value="xml.output_stylesheet" />
<xs:enumeration value="generate_statistics" />
<xs:enumeration value="query.startup_check" />
<xs:enumeration value="default_catalog" />
<xs:enumeration value="proxyfactory.factory_class" />
<xs:enumeration value="adonet.factory_class" />
<xs:enumeration value="default_batch_fetch_size" />
<xs:enumeration value="default_entity_mode" />
<xs:enumeration value="use_sql_comments" />
<xs:enumeration value="format_sql" />
<xs:enumeration value="collectiontype.factory_class" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>

vinoth v

unread,
Feb 10, 2011, 10:27:49 PM2/10/11
to nhu...@googlegroups.com
hi,

<xs:enumeration value="default_schema" />Schema Name Rite???
<xs:enumeration value="default_catalog" /> what values will come here???
<xs:enumeration value="connection.connection_string" /> here connection details server name ,schema name,user name password will come that i know like default schema and default catalog what values need to assign.

thanks in advance.

John Davidson

unread,
Feb 11, 2011, 7:20:15 AM2/11/11
to nhu...@googlegroups.com
Those values are the names you assigned to the schema and the catalog in the database when you created it. Only you know the values.

A hint: What would the values be for the connection string if this were not an NHibernate project, but just an ASP.Net project?

John Davidson

vinoth v

unread,
Feb 11, 2011, 11:49:25 PM2/11/11
to nhu...@googlegroups.com
hi,

but My project is Windows application. for tat how to assign both the values.
Reply all
Reply to author
Forward
0 new messages