mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
15586: Merged V3.1 to V3.2 14863: Fixed ETHREEOH-2223: Oracle version-specific schema update failure in upgrading from 2.1A build to 3.1 build 15041: Further fix for ETHREEOH-2223: Oracle version-specific schema update failure in upgrading from 2.1A build to 3.1 build 15428: The ipAddress field of HibernateNodeDaoServiceImpl is 39 characters long (Transaction.hbm.xml modified) 15472: Incremented schema version number for SQL patch 15502: ETHREEOH-2292: Deployment failure in case of IPv6 on Win 2k8 *NOTE*: Removed Derby scripts as it's no longer supported 15588: (record only after Derby script removal) Fixed over-zelous move of Derby scripts 15589: Removed hard-coded GUEST reference ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r14863,15041,15428,15472,15502 Merged /alfresco/BRANCHES/V3.2:r15586,15588-15589 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16863 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
216 lines
6.0 KiB
XML
216 lines
6.0 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.TransactionImpl"
|
|
proxy="org.alfresco.repo.domain.Transaction"
|
|
table="alf_transaction"
|
|
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>
|
|
<!-- Optimistic locking -->
|
|
<version column="version" name="version" type="long" />
|
|
<!-- forward assoc to server IP -->
|
|
<many-to-one
|
|
name="server"
|
|
class="org.alfresco.repo.domain.hibernate.ServerImpl"
|
|
column="server_id"
|
|
foreign-key="fk_alf_txn_svr"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="false"
|
|
cascade="none" />
|
|
<property name="changeTxnId" column="change_txn_id" type="string" length="56" not-null="true" />
|
|
<property name="commitTimeMs" column="commit_time_ms" type="long" not-null="false" index="idx_alf_txn_ctms" />
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.ServerImpl"
|
|
proxy="org.alfresco.repo.domain.Server"
|
|
table="alf_server"
|
|
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>
|
|
<natural-id>
|
|
<property name="ipAddress" column="ip_address" type="string" length="39" not-null="true" />
|
|
</natural-id>
|
|
<!-- Optimistic locking -->
|
|
<version column="version" name="version" type="long" />
|
|
</class>
|
|
|
|
<query name="server.getServerByIpAddress">
|
|
select
|
|
server
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ServerImpl as server
|
|
where
|
|
server.ipAddress = :ipAddress
|
|
</query>
|
|
|
|
<query name="txn.GetTxnById">
|
|
select
|
|
txn
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
where
|
|
txn.id = :txnId
|
|
</query>
|
|
|
|
<query name="txn.GetMinCommitTime">
|
|
select
|
|
min(txn.commitTimeMs)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
</query>
|
|
|
|
<query name="txn.GetMaxCommitTime">
|
|
select
|
|
max(txn.commitTimeMs)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
</query>
|
|
|
|
<query name="txn.GetMaxIdByCommitTime">
|
|
<![CDATA[
|
|
select
|
|
max(txn.id)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
where
|
|
txn.commitTimeMs <= :maxCommitTime
|
|
]]>
|
|
</query>
|
|
|
|
<query name="txn.GetTxnsByCommitTimeAsc">
|
|
<![CDATA[
|
|
select
|
|
txn
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
where
|
|
txn.commitTimeMs >= :fromTimeInclusive and
|
|
txn.commitTimeMs < :toTimeExclusive and
|
|
txn.id not in (:excludeTxnIds) and
|
|
txn.server.id not in (:excludeServerIds)
|
|
order by
|
|
txn.commitTimeMs asc,
|
|
txn.id asc
|
|
]]>
|
|
</query>
|
|
|
|
<query name="txn.GetTxnsByCommitTimeDesc">
|
|
<![CDATA[
|
|
select
|
|
txn
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
where
|
|
txn.commitTimeMs >= :fromTimeInclusive and
|
|
txn.commitTimeMs < :toTimeExclusive and
|
|
txn.id not in (:excludeTxnIds) and
|
|
txn.server.id not in (:excludeServerIds)
|
|
order by
|
|
txn.commitTimeMs desc,
|
|
txn.id desc
|
|
]]>
|
|
</query>
|
|
|
|
<query name="txn.GetSelectedTxnsByCommitAsc">
|
|
<![CDATA[
|
|
select
|
|
txn
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
where
|
|
txn.id in (:includeTxnIds)
|
|
order by
|
|
txn.commitTimeMs asc,
|
|
txn.id asc
|
|
]]>
|
|
</query>
|
|
|
|
<query name="txn.CountTransactions">
|
|
select
|
|
count(txn.id)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
|
</query>
|
|
|
|
<query name="txn.GetTxnUpdateCountForStore">
|
|
select
|
|
count(node.uuid)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
join node.transaction as txn
|
|
where
|
|
txn.id = :txnId and
|
|
node.deleted = false
|
|
</query>
|
|
|
|
<query name="txn.GetTxnDeleteCountForStore">
|
|
select
|
|
count(node.uuid)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
join node.transaction as txn
|
|
where
|
|
txn.id = :txnId and
|
|
node.deleted = true
|
|
</query>
|
|
|
|
<query name="txn.GetTxnChangesForStore">
|
|
select
|
|
node
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
where
|
|
node.transaction.id = :txnId and
|
|
node.store.protocol = :protocol and
|
|
node.store.identifier = :identifier
|
|
</query>
|
|
|
|
<query name="txn.GetTxnChanges">
|
|
select
|
|
node
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
where
|
|
node.transaction.id = :txnId
|
|
</query>
|
|
|
|
<query name="txn.GetTxnsUnused">
|
|
<![CDATA[
|
|
select
|
|
txn.id
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
right join node.transaction as txn
|
|
where
|
|
node.id is null and
|
|
txn.id >= :minTxnId and
|
|
txn.commitTimeMs <= :maxCommitTime
|
|
order by
|
|
txn.id asc
|
|
]]>
|
|
</query>
|
|
|
|
</hibernate-mapping>
|