LLBLGen Designer Version 5.6.1
Database first development
Adapter
I was wondering how LLBLGen decides whether to mark some entity fields that correspond to foreign key fields in the database as: IsAutoCreated="true".
<EntityDefinition Name="Account" ObjectID="ef7922fe-0767-4123-8234-785a1eab9c63">
<Fields>
<Field Name="AccountId" Type="int" IsReadOnly="true" IsPrimaryKey="true" FieldIndex="0" />
<Field Name="AccountNumber" Type="string" MaxLength="35" FieldIndex="5" />
<Field Name="AccountNumberSuffix" Type="string" MaxLength="3" FieldIndex="6" />
<Field Name="BillValidationId" Type="int" IsAutoCreated="true" FieldIndex="3" />
<Field Name="CategoryId" Type="int" IsAutoCreated="true" FieldIndex="1" />
<Field Name="FundId" Type="int" IsAutoCreated="true" FieldIndex="2" />
<Field Name="IsDuc" Type="bool" FieldIndex="11" />
I noticed some entities use IsAutoCreated="true" on the foreign key fields and others don't.
I think the pattern is that older tables and entities in the project have IsAutoCreated="true" (which were probably made using LLBLGen version 2.x) while newer tables and entities that were added to the project don't.
According to the documentation: https://www.llblgen.com/Documentation/5.4/ReferenceManuals/Designer/html/B9EFCC19.htm
Gets a value indicating whether this instance is auto created fk field. Auto-created FK fields are fields which are auto-created when a relationship was created and will be removed if the relationship will removed.
I tried removing a relationship and it DID delete the entity field that was a foreign key. I don't want that behavior.
So, I'd like to remove the IsAutoCreated="true".
I don't see a way to do it in the LLBLGen designer. So, I was thinking about just opening the LLBLGen project file in a text editor and removing it manually.