Validator reference removed from VS file

Posts   
 
    
eugene
User
Posts: 85
Joined: 05-Oct-2004
# Posted on: 13-Apr-2006 12:47:28   

Hi there,

I am using the March 31st designer with the latest Extended Entity Template. I have a View-defined-as-entity in my model with a number of subtypes inheriting from it. After I did the generation, the validators of the subtypes wouldn't compile, since the base-validator was no longer present in the VS project. I added the reference by hand and regenerated and the the generation task removed the reference again. Am I doing something wrong, or can you guys reproduce this error?

Best regards!

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Apr-2006 15:15:30   

That's by design. Please note that validator classes will never be overwritten. This is because users can add code to those classes and overwriting these would also overwrite their code. So to protect custom code, the files are written once, and never overwritten. And if you want to change this behaviour, please check the following thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=626

Also, the validators are broken if you make a type a subtype. So you should change them by hand.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 13-Apr-2006 15:58:15   

What do you mean with 'since the base-validator was no longer present in the VS project.' ? Did you remove the validator class by hand?

Frans Bouma | Lead developer LLBLGen Pro
eugene
User
Posts: 85
Joined: 05-Oct-2004
# Posted on: 18-Apr-2006 09:40:00   

Hi Otis,

No I am sure I didn't. It was removed by the generator task, in my projekt the preference CleanUpVSNetProjects is set to true. The validator file of the subentity was removed every time I regenerated!

This may sound silly, but today, I cannot reproduce this problem. The validator is retained from a generation to the next. This is kind of wierd, since I don't use these validators (extended entity provides the possibility to override the members of the base class). I am really sorry for the trouble, consider this thread as done!

Best regards