mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
7629: QName Refactor Merge 6 of 9 7630: QName Refactor Merge 7 of 9 7631: QName Refactor Merge 8 of 9 7632: QName Refactor Merge 9 of 9 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8438 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -92,13 +92,21 @@
|
||||
<natural-id mutable="true">
|
||||
<many-to-one name="accessControlList"
|
||||
class="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl"
|
||||
column="acl_id" lazy="no-proxy" fetch="select"
|
||||
optimistic-lock="true" not-null="true"/>
|
||||
column="acl_id"
|
||||
foreign-key="fk_alf_aclm_acl"
|
||||
lazy="no-proxy"
|
||||
fetch="select"
|
||||
optimistic-lock="true"
|
||||
not-null="true"/>
|
||||
|
||||
<many-to-one name="accessControlEntry"
|
||||
class="org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl"
|
||||
column="ace_id" lazy="no-proxy" fetch="select"
|
||||
optimistic-lock="true" not-null="true"/>
|
||||
column="ace_id"
|
||||
foreign-key="fk_alf_aclm_ace"
|
||||
lazy="no-proxy"
|
||||
fetch="select"
|
||||
optimistic-lock="true"
|
||||
not-null="true"/>
|
||||
|
||||
<property name="position" column="pos" type="int"/>
|
||||
</natural-id>
|
||||
@@ -230,13 +238,21 @@
|
||||
<natural-id mutable="true">
|
||||
<many-to-one name="authority"
|
||||
class="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
|
||||
column="auth_id" lazy="no-proxy" fetch="select"
|
||||
optimistic-lock="true" not-null="true"/>
|
||||
column="auth_id"
|
||||
foreign-key="fk_alf_autha_aut"
|
||||
lazy="no-proxy"
|
||||
fetch="select"
|
||||
optimistic-lock="true"
|
||||
not-null="true"/>
|
||||
|
||||
<many-to-one name="alias"
|
||||
class="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
|
||||
column="alias_id" lazy="no-proxy" fetch="select"
|
||||
optimistic-lock="true" not-null="true"/>
|
||||
column="alias_id"
|
||||
foreign-key="fk_alf_autha_ali"
|
||||
lazy="no-proxy"
|
||||
fetch="select"
|
||||
optimistic-lock="true"
|
||||
not-null="true"/>
|
||||
</natural-id>
|
||||
|
||||
<version column="version" name="version" type="long"/>
|
||||
|
@@ -33,7 +33,7 @@
|
||||
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_commit_time_ms" />
|
||||
<property name="commitTimeMs" column="commit_time_ms" type="long" not-null="false" index="idx_alf_txn_ctms" />
|
||||
</class>
|
||||
|
||||
<class
|
||||
|
@@ -654,7 +654,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
||||
}
|
||||
|
||||
InputStream scriptInputStream = new FileInputStream(scriptFile);
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(scriptInputStream, "UTF8"));
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(scriptInputStream, "UTF-8"));
|
||||
try
|
||||
{
|
||||
int line = 0;
|
||||
@@ -695,11 +695,21 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
||||
execute = true;
|
||||
optional = false;
|
||||
}
|
||||
else if (sql.endsWith(";(optional)"))
|
||||
else if (sql.endsWith("(optional)") || sql.endsWith("(OPTIONAL)"))
|
||||
{
|
||||
sql = sql.substring(0, sql.length() - 11);
|
||||
execute = true;
|
||||
optional = true;
|
||||
// Get the end of statement
|
||||
int endIndex = sql.lastIndexOf(';');
|
||||
if (endIndex > 0)
|
||||
{
|
||||
sql = sql.substring(0, endIndex);
|
||||
execute = true;
|
||||
optional = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ends with "(optional)" but there is no semi-colon.
|
||||
// Just take it at face value and probably fail.
|
||||
}
|
||||
}
|
||||
// append to the statement being built up
|
||||
sb.append(" ").append(sql);
|
||||
|
Reference in New Issue
Block a user