Circular dependency causes Ntangle to end in infinite loop
karpikpl opened this issue · 1 comments
karpikpl commented
Sample (wrong) configuration:
schema: dbo # Defaults the schema for the non-CDC related tables.
cdcSchema: NTangle # Defines the name of the schema to be used for CDC-related artefacts.
cdcSchemaCreate: true # Indicates whether to create the database schema via code-generation.
cdcEnable: true # Indicates whether to enable CDC for the referenced table(s) in the database.
eventSourceRoot: /database/cdc # Event source URI root prepended to all published events.
eventSubjectRoot: LegacyProperty # Event subject root prepended to all published events.
outbox: true # Indicates to include the generation of the event outbox artefacts.
identifierMapping: true # Indicates to include the generation of the global identifier mapping artefacts.
excludeColumnsFromETag: [ RowVersion ] # Default list of columns to exclude from the generated ETag (exclude from version tracking).
service: HostedService # Create the entity-based hosted services to be executed by the likes of a console application.
tables:
# Set up CDC for primary table Legacy.Posts.
# Relational hierarchy: Legacy.Posts
# - Legacy.Comments (1:n)
# - Legacy.Tags (1:n)
# - Legacy.Tags (1:n).
- { name: Hotel, model: Hotel, eventSourceFormat: NameOnly, eventSubjectFormat: NameAndKey,
joins: [
# Set up secondary One-To-Many relationship from Legacy.Posts to Legacy.Comments (1:n).
# Join on Comments.PostsId = Posts.PostsId.
# The .NET model should be singular in name.
{ name: Address, model: Address, joinTo: Address, joinCardinality: OneToOne, excludeColumns: [ ],
on: [
{ name: AddressId, toColumn: AddressId }
]
}
issues is caused by joinTo: Address
- should be joinTo: Hotel