Skip to content
Snippets Groups Projects
Commit b12de51a authored by Alexander Vögl's avatar Alexander Vögl Committed by Johannes Goderbauer
Browse files

[Projekt: Entwicklung - xRM][TicketNr.: 1069881][Beleg - Es kann kein neuer Beleg angelegt werden]

&
add missing Index on new Column
parent 6eb7f50f
No related branches found
No related tags found
No related merge requests found
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="a.voegl" id="6d545d51-b838-4325-9573-5fe51eade79b">
<createIndex indexName="IDX_CAMPAIGNPART_RES_CONTACT" tableName="CAMPAIGNPARTICIPANT">
<column name="RESPONSIBLE_CONTACT_ID"/>
</createIndex>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<include relativeToChangelogFile="true" file="insert_employeeCountAttribute.xml"/> <include relativeToChangelogFile="true" file="insert_employeeCountAttribute.xml"/>
<include relativeToChangelogFile="true" file="alter_CampaignParticipantResponsible.xml"/> <include relativeToChangelogFile="true" file="alter_CampaignParticipantResponsible.xml"/>
<include relativeToChangelogFile="true" file="alter_TableLeadStatus.xml"/> <include relativeToChangelogFile="true" file="alter_TableLeadStatus.xml"/>
<include relativeToChangelogFile="true" file="alter_CampaignParticipantResponsibleIndex.xml"/>
<include relativeToChangelogFile="true" file="MSTeams/changelog.xml"/> <include relativeToChangelogFile="true" file="MSTeams/changelog.xml"/>
<include relativeToChangelogFile="true" file="insert_newsletterAttribute.xml"/> <include relativeToChangelogFile="true" file="insert_newsletterAttribute.xml"/>
<include relativeToChangelogFile="true" file="readd_ExporttemplateIndizes.xml"/> <include relativeToChangelogFile="true" file="readd_ExporttemplateIndizes.xml"/>
......
...@@ -4253,10 +4253,11 @@ SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol, pAsPrepar ...@@ -4253,10 +4253,11 @@ SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol, pAsPrepar
} }
/** /**
* resolves key-value pairs (of strings) into a case when expression * resolves key-value pairs (of strings) into a case when expression;
* This function tries to get the columntype for better type comparison
* *
* @param {String[][]} pKeyValueArray you've to pass a 2D-Array where each element has at pos0 the key and pos1 the value * @param {String[][]} pKeyValueArray you've to pass a 2D-Array where each element has at pos0 the key and pos1 the value
* @param {String} pDbFieldName name fo the database field where the KEY-value is stored * @param {String} pDbFieldName name fo the database field where the KEY-value is stored; prefers TABLENAME.COLUMNNAME
* @param {String} [pLocale=current client language] specifies the locale for translating the title; can be false if nothing shalle be translated * @param {String} [pLocale=current client language] specifies the locale for translating the title; can be false if nothing shalle be translated
* *
* @return {String} a SQL-expression (case-when-statement) that resolves the KEYID into the title -> as preparedSatement-elements * @return {String} a SQL-expression (case-when-statement) that resolves the KEYID into the title -> as preparedSatement-elements
...@@ -4278,7 +4279,13 @@ SqlUtils.getResolvingCaseWhen = function(pKeyValueArray, pDbFieldName, pLocale) ...@@ -4278,7 +4279,13 @@ SqlUtils.getResolvingCaseWhen = function(pKeyValueArray, pDbFieldName, pLocale)
}; };
//!SqlBuilder //!SqlBuilder
var resSql = "case ", preparedValues = []; var resSql = "case ", preparedValues = [];
var colTypeKeyId = SQLTYPES.CHAR;
var colTypeKeyId = SQLTYPES.CHAR; //the standard type is char
var fields = SqlUtils._parseFieldQualifier(pDbFieldName); //validate the DB-field for proper form (CONTACT.CONTACTID)
if (!(fields instanceof TypeError))
colTypeKeyId = SqlUtils.getSingleColumnType(pDbFieldName, undefined, this.alias);
//some databases dont auto cast on their own so we need the proper type
var colTypeTitle = SQLTYPES.NVARCHAR; var colTypeTitle = SQLTYPES.NVARCHAR;
for (var i = 0, l = keyData.length; i < l; i++) for (var i = 0, l = keyData.length; i < l; i++)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment