We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I just want to know if this is possible to do with fluent nhibernate.
I got a self reference table in my database.
Table Service { int Season (PK) (FK) int Service_No (PK) int ParentService_No (FK) }
The table has a composite key as Season and Service_No, and Foreign Key for Self Reference as Season and ParentService_No
I try to create a collection property called ChildServices in my Service Class as many to many relations.
HasManyToMany(x => x.ChildServices ) .Table("SERVICE") .Access.Property() .AsBag() .Cascade.SaveUpdate() .LazyLoad() .Generic() .ParentKeyColumns.Add("SEASON") .ParentKeyColumns.Add("SERVICE_NO") .ChildKeyColumns.Add("SEASON") .ChildKeyColumns.Add("P_SERVICE_NO");
If I use above mapping, it will throw my exception saying Repeated column in mapping for collection: Service.ChildServices column: SEASON
How can I do this? Is this a limitation of fluent nhibernate?
Thanks for answering my question.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I just want to know if this is possible to do with fluent nhibernate.
I got a self reference table in my database.
Table Service
{
int Season (PK) (FK)
int Service_No (PK)
int ParentService_No (FK)
}
The table has a composite key as Season and Service_No, and Foreign Key for Self Reference as Season and ParentService_No
I try to create a collection property called ChildServices in my Service Class as many to many relations.
HasManyToMany(x => x.ChildServices )
.Table("SERVICE")
.Access.Property()
.AsBag()
.Cascade.SaveUpdate()
.LazyLoad()
.Generic()
.ParentKeyColumns.Add("SEASON")
.ParentKeyColumns.Add("SERVICE_NO")
.ChildKeyColumns.Add("SEASON")
.ChildKeyColumns.Add("P_SERVICE_NO");
If I use above mapping, it will throw my exception saying Repeated column in mapping for collection: Service.ChildServices column: SEASON
How can I do this? Is this a limitation of fluent nhibernate?
Thanks for answering my question.
The text was updated successfully, but these errors were encountered: