mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
- Ensure uniqueness across any three (incl. null) Serializable values - Required to support RM rma:identifier contextual uniqueness DB Update for MySQL: drop table if exists alf_prop_unique_ctx; CREATE TABLE alf_prop_unique_ctx ( id BIGINT NOT NULL AUTO_INCREMENT, version SMALLINT NOT NULL, value1_prop_id BIGINT NOT NULL, value2_prop_id BIGINT NOT NULL, value3_prop_id BIGINT NOT NULL, UNIQUE INDEX idx_alf_prop_unique_ctx (value1_prop_id, value2_prop_id, value3_prop_id), CONSTRAINT fk_alf_prop_unique_ctx_1 FOREIGN KEY (value1_prop_id) REFERENCES alf_prop_value (id) ON DELETE CASCADE, CONSTRAINT fk_alf_prop_unique_ctx_2 FOREIGN KEY (value2_prop_id) REFERENCES alf_prop_value (id) ON DELETE CASCADE, CONSTRAINT fk_alf_prop_unique_ctx_3 FOREIGN KEY (value3_prop_id) REFERENCES alf_prop_value (id) ON DELETE CASCADE, PRIMARY KEY (id) ); git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16417 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
58 lines
2.3 KiB
XML
58 lines
2.3 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE sqlMap
|
|
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
|
|
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
|
|
|
|
<sqlMap namespace="alfresco.propval">
|
|
|
|
<insert id="insert_PropertyClass" parameterClass="PropertyClass" >
|
|
<include refid="insert_PropertyClass_AutoIncrement"/>
|
|
<selectKey resultClass="long" keyProperty="id" type="post">
|
|
KEY_COLUMN:GENERATED_KEY
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<insert id="insert_PropertyStringValue" parameterClass="PropertyStringValue" >
|
|
<include refid="insert_PropertyStringValue_AutoIncrement"/>
|
|
<selectKey resultClass="long" keyProperty="id" type="post">
|
|
KEY_COLUMN:GENERATED_KEY
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<insert id="insert_PropertyDoubleValue" parameterClass="PropertyDoubleValue" >
|
|
<include refid="insert_PropertyDoubleValue_AutoIncrement"/>
|
|
<selectKey resultClass="long" keyProperty="id" type="post">
|
|
KEY_COLUMN:GENERATED_KEY
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<insert id="insert_PropertySerializableValue" parameterMap="parameter_PropertySerializableValue" >
|
|
<include refid="insert_PropertySerializableValue_AutoIncrement"/>
|
|
<selectKey resultClass="long" keyProperty="id" type="post">
|
|
KEY_COLUMN:GENERATED_KEY
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<insert id="insert_PropertyValue" parameterClass="PropertyValue" >
|
|
<include refid="insert_PropertyValue_AutoIncrement"/>
|
|
<selectKey resultClass="long" keyProperty="id" type="post">
|
|
KEY_COLUMN:GENERATED_KEY
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<insert id="insert_PropertyRoot" parameterMap="parameter_PropertyRoot" >
|
|
<include refid="insert_PropertyRoot_AutoIncrement"/>
|
|
<selectKey resultClass="long" keyProperty="id" type="post">
|
|
KEY_COLUMN:GENERATED_KEY
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<insert id="insert_PropertyUniqueContext" parameterClass="PropertyUniqueContext" >
|
|
<include refid="insert_PropertyUniqueContext_AutoIncrement"/>
|
|
<selectKey resultClass="long" keyProperty="id" type="post">
|
|
KEY_COLUMN:GENERATED_KEY
|
|
</selectKey>
|
|
</insert>
|
|
|
|
</sqlMap> |