Skip to content

Commit

Permalink
HCK-7927 (#230)
Browse files Browse the repository at this point in the history
* HCK-7927: Add logic to comment inactive statements

* HCK-7927: Revert commentDeactivatedStatements change

* HCK-7927: fix remarks

* HCK-7927: small update

* HCK-7927: Update joinColumnNames logic

* HCK-7927: consider isActivated from column
  • Loading branch information
Nightlngale authored Sep 10, 2024
1 parent b26f78e commit b0b51ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forward_engineering/helpers/viewHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { getViewTagsStatement } = require('./unityTagsHelper');

const getColumnNames = _ => (collectionRefsDefinitionsMap, columns) => {
return _.uniq(
Object.keys(columns).map(name => {
Object.entries(columns).map(([name, definition]) => {
const id = _.get(columns, [name, 'GUID']);

const itemDataId = Object.keys(collectionRefsDefinitionsMap).find(viewFieldId => {
Expand All @@ -24,7 +24,7 @@ const getColumnNames = _ => (collectionRefsDefinitionsMap, columns) => {
const dbName = db.code || db.name;
const fullColumnName = `${dbName ? prepareName(dbName) + '.' : ''}${prepareName(collectionName)}.${prepareName(itemData.name)} as ${prepareName(name)}`;

return commentDeactivatedStatement(fullColumnName, itemData.definition.isActivated);
return commentDeactivatedStatement(fullColumnName, definition.isActivated);
}),
).filter(_.identity);
};
Expand Down

0 comments on commit b0b51ac

Please sign in to comment.