This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have a custom association resolver for "backreference" and the "collection" end but it is expecting to have a valid column name specified. Generation is set to "defualt". My db uses cross-cutting composite keys hence i have the custom resolvers, but it seems like it is still trying to use LS's default mechanism of resolving associations. I thought if I specified a custom resolver it would completely override LS but that doesn't seem to be the case. Can this be fixed? Thanks. |
|
|
What do you mean by "it is expecting to have a valid column name specified"? Do you mean in the designer? Or at runtime? What is the error or unexpected behaviour that you see? If the problem is occurring at runtime, can you provide a minimal repro please? Thanks! |
|
|
Sorry.. I should've probably provided some more details. Here it is: The problem is occurring at runtime. My two entities are "Product" and "CustomerProduct" Product has a single field primary key: "PartCode" CustomerProduct has a composite primary key: "PartCode" and "CustomerId" There's a one to many association between Product and CustomerProduct: Product.PartCode = CustomerProduct.Partcode (part of the primary key is also the foreign key) I have a one-to-many association defined in the designer. Generation is set to default. but resolvers are set to custom classes. At run time when I load "CustomerProduct" i get a db error: "Component 'PRODUCTID' must be declared. Invalid identifier." -- It's trying to look for the foreign key in a field named 'PRODUCTID'. I thought by having a custom resolver defined it would not attempt at the default wiring. Here is backreference resolver:
And here's my collection resolver:
Hope this makes it a bit more clear.. Thanks, again. |
|