# /--------------------------------------------------------------------------- # additionalForeignKeyMap: (NotRequired - Default 'map:{}') # # If foreign key does not exist in your database, # you can set up here as virtual foreign key for DBFlute. # # And it's one-to-one relation if you add one fixed condition to referrer table, # you can set virtual foreign key with fixedCondition and fixedSuffix. # And you can use it to view objects too. # # If local column name is same as foreign column name, # you can omit the setting of localColumnName and foreignColumnName. # The names are treated as case insensitive. # # Example: # map:{ # ; FK_MEMBER_MEMBER_STATUS_CODE = map:{ # ; localTableName = MEMBER ; foreignTableName = MEMBER_STATUS # ; localColumnName = MEMBER_STATUS_CODE ; foreignColumnName = MEMBER_STATUS_CODE # } # ; FK_PURCHASE_MEMBER_ID = map:{ # ; localTableName = PURCHASE ; foreignTableName = MEMBER # } # ; FK_MEMBER_MEMBER_ADDRESS_VALID = map:{ # ; localTableName = MEMBER ; foreignTableName = MEMBER_ADDRESS # ; localColumnName = MEMBER_ID ; foreignColumnName = MEMBER_ID # ; fixedCondition = # $$foreignAlias$$.VALID_BEGIN_DATE <= /*targetDate(Date)*/null # and $$foreignAlias$$.VALID_END_DATE >= /*targetDate(Date)*/null # ; fixedSuffix = AsValid # } # } # # *The line that starts with '#' means comment-out. # map:{ #; FK_MEMBER_MEMBER_STATUS_CODE = map:{ # ; localTableName = MEMBER ; foreignTableName = MEMBER_STATUS # ; localColumnName = MEMBER_STATUS_CODE ; foreignColumnName = MEMBER_STATUS_CODE #} } # ----------------/