ULPSR wrote:
daelmo wrote:
ULPSR wrote:
Yes, we have an entity called validator.
The generated code this.Validator = validator; throws error in the llbl file.
In What Entity are you putting that code (this.Validator = validator)?
I guess this.Validator is an ValidatorEntity, but validator is an IValidator, that's why the compilation error, coz there is a property in all entities called Validator, but maybe you have a related entity in this that points to a ValidatorEntity.
Is there any chance you change the related entity name Validator to something else (like TheValidator)?
I hope that makes sense. If you still run into troubles, please post you llblgenproj file so we can test it.
This problem still persists, we have a table name "validator" and is being refenrenced at many places. It throwing error in 2 out of 5 files which have validator as Foreign key. Do we have any alternate solution to changing the table name?
The problem is not at the entity name, but in the navigator name of the related entities. For example: you have a ValidatorEntity, you also have AbcEntity which has reference (relation) to ValidatorEntity. So the navigator for AbcEntity is named "Validator". So you end up with a AbcEntity.Validator object in AbcEntity. That causes an ambiguity problem. For instance, in InitClassEmpty method of every entity you have this line:
this.Validator = validator;
And in that place -I guess- is where you are getting the compilation errors.
So, to fix it you must change your navigator names in LLBLGen Designer, for instance for AbcEntity, for Validator navigator you should rename it to something like TheValidator.
This is the only way I can thing of. The other hard way could be changing the templates, but I don't think that is wise as you will have to maintain them, and maybe you have to do a lot of changes.
Consider my workaround. You don't have to change the table name or the entity name, just change the navigator names. Then run some refactoring process to update your code.