Files
alfresco-community-repo/source/java/org/alfresco/repo/domain/hibernate/QName.hbm.xml
Derek Hulley a118105ed7 Merged V2.2 to HEAD
8146: Interim checkin for Oracle upgrade scripts.
   8150: AR-1905
   8151: AR-1956
   8152: Correct I18N when reporting patch description
   8153: QName script for Oracle along with fixes for unique constraints on assoc tables
   8155: Upgrade scripts for Oracle V2.2 - almost there
   8164: AWC-1633: Unable to edit rule added via web service
   8166: V2.2 upgrade scripts for MySQL and Oracle
   8170: AWC-1515: E-mail doesn't reach user's mail box, if it was created with the help of templates
   8174: Fix for AWC-798
   8180: Fix for AWC-1843
   8183: Fixes for different unique index names on alf_child_assoc
   8189: AWC-1719: Need to alllow Rules to account for a space being deleted
   8249: Fixed handling of empty namespaces on Oracle
   8259: Fixes for null namespaces in QName
   8360: Modified alf_audit_date columns and added patch
   8404: Fix AR-2133: Fix handling of empty namespaces during upgrade


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8481 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2008-03-10 15:32:55 +00:00

83 lines
2.8 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
'-//Hibernate/Hibernate Mapping DTD 3.0//EN'
'http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd'>
<hibernate-mapping>
<class
name="org.alfresco.repo.domain.hibernate.NamespaceEntityImpl"
proxy="org.alfresco.repo.domain.NamespaceEntity"
table="alf_namespace"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
lazy="true"
optimistic-lock="version" >
<!-- auto-generated ID -->
<id name="id" column="id" type="long" >
<generator class="native" />
</id>
<!-- Namespace URL must be unique -->
<natural-id mutable="true">
<property name="safeUri" column="uri" type="string" length="100" not-null="true" />
</natural-id>
<!-- Optimistic locking -->
<version column="version" name="version" type="long" />
</class>
<class
name="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
proxy="org.alfresco.repo.domain.QNameEntity"
table="alf_qname"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
lazy="true"
optimistic-lock="version" >
<!-- auto-generated ID -->
<id name="id" column="id" type="long" >
<generator class="native" />
</id>
<!-- Namespace and localname must be unique -->
<natural-id mutable="true">
<!-- forward assoc to namespace -->
<many-to-one
name="namespace"
class="org.alfresco.repo.domain.hibernate.NamespaceEntityImpl"
column="ns_id"
foreign-key="fk_alf_qname_ns"
lazy="proxy"
fetch="join"
unique="false"
not-null="true"
cascade="none" />
<property name="localName" column="local_name" type="string" length="200" not-null="true" />
</natural-id>
<!-- Optimistic locking -->
<version column="version" name="version" type="long" />
</class>
<query name="qname.GetNamespaceByUri" cacheable="false">
select
namespace
from
org.alfresco.repo.domain.hibernate.NamespaceEntityImpl as namespace
where
namespace.safeUri = :namespaceUri
</query>
<query name="qname.GetQNameByUriAndLocalName" cacheable="false">
select
qname
from
org.alfresco.repo.domain.hibernate.QNameEntityImpl as qname
join qname.namespace as namespace
where
namespace.safeUri = :namespaceUri and
qname.localName = :localName
</query>
</hibernate-mapping>