/// Marks variable as intermediate-object of an dbObject
/// </summary>
/// <param name="intermediateTableName">Table-name of intermediate-table. Must contain primaryKey of this class & target class</param>
/// <param name="keyName">Fieldname of primaryKey associated with the IntermediateObject on this side [m]:n (null if same as primary key) [Only works with 1 primaryKey]</param>
/// <param name="foreignKeyName">Fieldname of primaryKey associated with the IntermediateObject on the other side m:[n] (null if same as primary key) [Only works with 1 primaryKey]</param>
if(classAttribute.primaryKeyAttributes.Count<1)thrownewInvalidOperationException($"'{classAttribute.parentClassType.Name}' does not have a primaryKey.");
if(classAttribute.primaryKeyAttributes.Count>1)thrownewInvalidOperationException($"IntermediateObject does not support multiple primaryKeys.");
thrownewInvalidOperationException($"IntermediateObject has to be typeof(List<T>). Maybe you meant to use DbForeignObject or DbReverseForeignObject for 1:m or 1:1 relations.");
if(foreignDbObject.primaryKeyAttributes.Count<1)thrownewInvalidOperationException($"'{foreignDbObject.parentClassType.Name}' does not have a primaryKey.");
if(foreignDbObject.primaryKeyAttributes.Count>1)thrownewInvalidOperationException($"IntermediateObject does not support multiple primaryKeys. (Found '{foreignDbObject.primaryKeyAttributes.Count}' in '{foreignDbObject.parentClassType.Name}')");