dkrants wrote:
I'm facing a very debilitating problem with LLBLGenPro. Mybe I'm doing something wrond here...
I've added one table to a database and I want to just refersh a database schema in LLBLGen to include this table. I just can't find any way to do it other than do "[b]Refresh relational data model from database[/b]".
The problems with this option are:
1. For some reason it goes and validates the entire entity model and if there are any errors it doesn't refresh database schema. So I need to either go and fix all 100 errors or just delete all the entities just to add another table to the schema (loosing all my changes I've done to the model).
It does that because it can't migrate an invalid model to the new meta-data. Refreshing the meta-data isn't just replacing the table info, it's also updating the mappings, entities etc. An invalid model means it's impossible to migrate it to the new db schema.
As you refresh the meta-data from a database schema, it means the model follows the db schema, or better: it's a reverse engineered model from that db schema. If you don't want that, add the entity first and then auto-map it to a new table, export that script and run that on the DB.
- Even if there are no errors in the model - after refreshing the database schema - it goes and re-builds the entire entity model after which my model on which I've worked 2 hours to bring it to a good shape becomes invalid!!! I've started getting numerous validation errors.
Refreshing is controlled by settings: please check the project properties and verify that all the settings are set to the right value. For example, it can be you don't want relationships in the model to follow FK constraints. You can switch that off.
I understand it can be frustrating to see many many errors, but as Matt said, they're there for a reason: something IS wrong. If you could give us the error, we could give you more information about why the error occurs and what to do about it so they won't pop up again.