Table of Contents

Section Attribute

Table

Database Table Entity On Key 5 Conversions On Key 5 Tables Other Entities stored in same Table
Transaction res.section_attribute Section Attribute ConvertSectionAttribute
stdAttributeValues

Columns

Property Db Table Db Column Db DataType Nullable Primary Key Joins
SectionId res.section_attribute section_id bigint False
SectionCode res.section code character varying(50) False res.section_attribute.section_id = res.section.section_id
SectionDescription res.section description character varying(100) False res.section_attribute.section_id = res.section.section_id
CreatedByUserId res.section_attribute created_by_user_id bigint False
CreatedByUserCode uam.user code character varying(50) False res.section_attribute.created_by_user_id = uam.user.user_id
CreatedByUserFullName uam.user full_name character varying(200) False res.section_attribute.created_by_user_id = uam.user.user_id
CreatedOn res.section_attribute created_on timestamp without time zone False
IsActive res.section_attribute is_active boolean False
ModifiedByUserId res.section_attribute modified_by_user_id bigint False
ModifiedByUserCode uam.user code character varying(50) False res.section_attribute.modified_by_user_id = uam.user.user_id
ModifiedByUserFullName uam.user full_name character varying(200) False res.section_attribute.modified_by_user_id = uam.user.user_id
ModifiedOn res.section_attribute modified_on timestamp without time zone False
PermissionTreeId res.section_attribute permission_tree_id bigint False
PermissionTreeCode uam.permission_tree code text False res.section_attribute.permission_tree_id = uam.permission_tree.permission_tree_id
PermissionTreeDescription uam.permission_tree description text True res.section_attribute.permission_tree_id = uam.permission_tree.permission_tree_id
Version res.section_attribute version integer False
Id res.section_attribute section_attribute_id bigint False True
AttributeId res.section_attribute attribute_id bigint False
AttributeCode gen.attribute code character varying(50) False res.section_attribute.attribute_id = gen.attribute.attribute_id
AttributeDescription gen.attribute description character varying(100) False res.section_attribute.attribute_id = gen.attribute.attribute_id
AttributeAllowAnyValue gen.attribute allow_any_value boolean False res.section_attribute.attribute_id = gen.attribute.attribute_id
AttributeDataType gen.attribute data_type system.dynamic_value_data_type False res.section_attribute.attribute_id = gen.attribute.attribute_id
AttributeDefaultValue gen.attribute default_value system.dynamic_value True res.section_attribute.attribute_id = gen.attribute.attribute_id
AttributeDefaultAllowedValueId gen.attribute_allowed_value attribute_allowed_value_id bigint False True res.section_attribute.attribute_id = gen.attribute.attribute_id Then
gen.attribute.default_allowed_value_id = gen.attribute_allowed_value.attribute_allowed_value_id
AttributeDefaultAllowedValueDescription gen.attribute_allowed_value description text True res.section_attribute.attribute_id = gen.attribute.attribute_id Then
gen.attribute.default_allowed_value_id = gen.attribute_allowed_value.attribute_allowed_value_id
AttributeDefaultAllowedValueValue gen.attribute_allowed_value value system.dynamic_value False res.section_attribute.attribute_id = gen.attribute.attribute_id Then
gen.attribute.default_allowed_value_id = gen.attribute_allowed_value.attribute_allowed_value_id
Notes res.section_attribute notes text True
PredefinedValueId res.section_attribute attribute_value_id bigint True
PredefinedValueDescription gen.attribute_allowed_value description text True res.section_attribute.attribute_value_id = gen.attribute_allowed_value.attribute_allowed_value_id
PredefinedValueValue gen.attribute_allowed_value value system.dynamic_value False res.section_attribute.attribute_value_id = gen.attribute_allowed_value.attribute_allowed_value_id
SequenceNumber res.section_attribute sequence_number integer True
Value res.section_attribute attribute_value system.dynamic_value True

Enumerations

Mapping 1

Property Property Type Db Column Db Column Type Db Column Values
AttributeDataType DynamicValueType data_type system.dynamic_value_data_type String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean

Composites

Mapping 1

Property Property Type Db Column Db Column Type
AttributeDefaultValue DbDynamicValue default_value system.dynamic_value
Composite Property Db Composite Column Property Type
Type type String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
Value value String

Mapping 2

Property Property Type Db Column Db Column Type
AttributeDefaultAllowedValueValue DbDynamicValue value system.dynamic_value
Composite Property Db Composite Column Property Type
Type type String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
Value value String

Mapping 3

Property Property Type Db Column Db Column Type
PredefinedValueValue DbDynamicValue value system.dynamic_value
Composite Property Db Composite Column Property Type
Type type String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
Value value String

Mapping 4

Property Property Type Db Column Db Column Type
Value DbDynamicValue attribute_value system.dynamic_value
Composite Property Db Composite Column Property Type
Type type String
Email
Integer
Long
Float
Currency
DateTime
Date
Time
Duration
Boolean
Value value String

Queries

The list of example Section Attribute queries can be interpreted using the following legend:

Legend Description
Primary Table Alias The alias for the res.section_attribute table in the query
Include References Include (true) or exclude (false) all lookup table joins in the query
Include Permissions Include (true) or exclude (false) the permission table join in the query to enforce or skip row-level security based on the permissions for the user

Query 1

Primary Table Alias Include References Include Permissions
_sa False False
SELECT
    _sa.section_id AS "SectionId",
    _sa.created_by_user_id AS "CreatedByUserId",
    _sa.created_on AS "CreatedOn",
    _sa.is_active AS "IsActive",
    _sa.modified_by_user_id AS "ModifiedByUserId",
    _sa.modified_on AS "ModifiedOn",
    _sa.permission_tree_id AS "PermissionTreeId",
    _sa.version AS "Version",
    _sa.section_attribute_id AS "Id",
    _sa.attribute_id AS "AttributeId",
    _sa.notes AS "Notes",
    _sa.attribute_value_id AS "PredefinedValueId",
    _sa.sequence_number AS "SequenceNumber",
    _sa.attribute_value AS "Value"
FROM
    res.section_attribute _sa


Query 2

Primary Table Alias Include References Include Permissions
_sa True False
SELECT
    _s.section_id AS "SectionId",
    _s.code AS "SectionCode",
    _s.description AS "SectionDescription",
    _u.user_id AS "CreatedByUserId",
    _u.code AS "CreatedByUserCode",
    _u.full_name AS "CreatedByUserFullName",
    _sa.created_on AS "CreatedOn",
    _sa.is_active AS "IsActive",
    _u1.user_id AS "ModifiedByUserId",
    _u1.code AS "ModifiedByUserCode",
    _u1.full_name AS "ModifiedByUserFullName",
    _sa.modified_on AS "ModifiedOn",
    _pt.permission_tree_id AS "PermissionTreeId",
    _pt.code AS "PermissionTreeCode",
    _pt.description AS "PermissionTreeDescription",
    _sa.version AS "Version",
    _sa.section_attribute_id AS "Id",
    _a.attribute_id AS "AttributeId",
    _a.code AS "AttributeCode",
    _a.description AS "AttributeDescription",
    _a.allow_any_value AS "AttributeAllowAnyValue",
    _a.data_type AS "AttributeDataType",
    _a.default_value AS "AttributeDefaultValue",
    _a.default_allowed_value_id AS "AttributeDefaultAllowedValue",
    _aav.attribute_allowed_value_id AS "AttributeDefaultAllowedValueId",
    _aav.description AS "AttributeDefaultAllowedValueDescription",
    _aav.value AS "AttributeDefaultAllowedValueValue",
    _sa.notes AS "Notes",
    _aav1.attribute_allowed_value_id AS "PredefinedValueId",
    _aav1.description AS "PredefinedValueDescription",
    _aav1.value AS "PredefinedValueValue",
    _sa.sequence_number AS "SequenceNumber",
    _sa.attribute_value AS "Value"
FROM
    res.section_attribute _sa
    JOIN res.section _s ON _sa.section_id = _s.section_id
    JOIN uam.user _u ON _sa.created_by_user_id = _u.user_id
    JOIN uam.user _u1 ON _sa.modified_by_user_id = _u1.user_id
    JOIN uam.permission_tree _pt ON _sa.permission_tree_id = _pt.permission_tree_id
    JOIN gen.attribute _a ON _sa.attribute_id = _a.attribute_id
    LEFT JOIN gen.attribute_allowed_value _aav ON _a.default_allowed_value_id = _aav.attribute_allowed_value_id
    LEFT JOIN gen.attribute_allowed_value _aav1 ON _sa.attribute_value_id = _aav1.attribute_allowed_value_id


Query 3

Primary Table Alias Include References Include Permissions
_sa False True
Parameter Name Data Type Value
@permission_user_id Bigint 500000000000
@permission_id Bigint 100120400
WITH permission_tree_ids AS
(
    SELECT DISTINCT unnest(psd.permission_tree_ids) AS permission_tree_id FROM uam.user_permission up JOIN uam.permission_set_data psd ON up.permission_set_id = psd.permission_set_id WHERE up.user_id = @permission_user_id AND up.permission_id = @permission_id
)
SELECT
    _sa.section_id AS "SectionId",
    _sa.created_by_user_id AS "CreatedByUserId",
    _sa.created_on AS "CreatedOn",
    _sa.is_active AS "IsActive",
    _sa.modified_by_user_id AS "ModifiedByUserId",
    _sa.modified_on AS "ModifiedOn",
    _sa.permission_tree_id AS "PermissionTreeId",
    _sa.version AS "Version",
    _sa.section_attribute_id AS "Id",
    _sa.attribute_id AS "AttributeId",
    _sa.notes AS "Notes",
    _sa.attribute_value_id AS "PredefinedValueId",
    _sa.sequence_number AS "SequenceNumber",
    _sa.attribute_value AS "Value",
    _sa.permission_tree_id AS "_sa_permission_tree_id"
FROM
    res.section_attribute _sa
    JOIN permission_tree_ids permission_join ON _sa.permission_tree_id = permission_join.permission_tree_id


Query 4

Primary Table Alias Include References Include Permissions
_sa True True
Parameter Name Data Type Value
@permission_user_id Bigint 500000000000
@permission_id Bigint 100120400
WITH permission_tree_ids AS
(
    SELECT DISTINCT unnest(psd.permission_tree_ids) AS permission_tree_id FROM uam.user_permission up JOIN uam.permission_set_data psd ON up.permission_set_id = psd.permission_set_id WHERE up.user_id = @permission_user_id AND up.permission_id = @permission_id
)
SELECT
    _s.section_id AS "SectionId",
    _s.code AS "SectionCode",
    _s.description AS "SectionDescription",
    _u.user_id AS "CreatedByUserId",
    _u.code AS "CreatedByUserCode",
    _u.full_name AS "CreatedByUserFullName",
    _sa.created_on AS "CreatedOn",
    _sa.is_active AS "IsActive",
    _u1.user_id AS "ModifiedByUserId",
    _u1.code AS "ModifiedByUserCode",
    _u1.full_name AS "ModifiedByUserFullName",
    _sa.modified_on AS "ModifiedOn",
    _pt.permission_tree_id AS "PermissionTreeId",
    _pt.code AS "PermissionTreeCode",
    _pt.description AS "PermissionTreeDescription",
    _sa.version AS "Version",
    _sa.section_attribute_id AS "Id",
    _a.attribute_id AS "AttributeId",
    _a.code AS "AttributeCode",
    _a.description AS "AttributeDescription",
    _a.allow_any_value AS "AttributeAllowAnyValue",
    _a.data_type AS "AttributeDataType",
    _a.default_value AS "AttributeDefaultValue",
    _a.default_allowed_value_id AS "AttributeDefaultAllowedValue",
    _aav.attribute_allowed_value_id AS "AttributeDefaultAllowedValueId",
    _aav.description AS "AttributeDefaultAllowedValueDescription",
    _aav.value AS "AttributeDefaultAllowedValueValue",
    _sa.notes AS "Notes",
    _aav1.attribute_allowed_value_id AS "PredefinedValueId",
    _aav1.description AS "PredefinedValueDescription",
    _aav1.value AS "PredefinedValueValue",
    _sa.sequence_number AS "SequenceNumber",
    _sa.attribute_value AS "Value",
    _sa.permission_tree_id AS "_sa_permission_tree_id",
    _s.permission_tree_id AS "_s_permission_tree_id",
    _u.permission_tree_id AS "_u_permission_tree_id",
    _u1.permission_tree_id AS "_u1_permission_tree_id",
    _a.permission_tree_id AS "_a_permission_tree_id",
    _aav.permission_tree_id AS "_aav_permission_tree_id",
    _aav1.permission_tree_id AS "_aav1_permission_tree_id"
FROM
    res.section_attribute _sa
    JOIN permission_tree_ids permission_join ON _sa.permission_tree_id = permission_join.permission_tree_id
    JOIN res.section _s ON _sa.section_id = _s.section_id
    JOIN uam.user _u ON _sa.created_by_user_id = _u.user_id
    JOIN uam.user _u1 ON _sa.modified_by_user_id = _u1.user_id
    JOIN uam.permission_tree _pt ON _sa.permission_tree_id = _pt.permission_tree_id
    JOIN gen.attribute _a ON _sa.attribute_id = _a.attribute_id
    LEFT JOIN gen.attribute_allowed_value _aav ON _a.default_allowed_value_id = _aav.attribute_allowed_value_id
    LEFT JOIN gen.attribute_allowed_value _aav1 ON _sa.attribute_value_id = _aav1.attribute_allowed_value_id