Unable to create field in model first scenario

Posts   
 
    
cerberis
User
Posts: 93
Joined: 20-May-2011
# Posted on: 24-Feb-2018 20:40:39   

I have a project with LLBLGenPro 4.3 using .NET 4.6.1 with PostgreSQL. Now we decided to switch to latest version 5.3. I have downloaded trial version of 5.3 and tried to convert existing project. So far so good. I have managed to successfully migrate from 4.3 to 5.3 without any issues (good job!). Today I tried to add a new field to entity. I am able to do so, but seems like if I go to "Fields Mapping" tab in order to create physical field definition, I found that "Target Element Name" is marked with exclamation mark (previously it was suggested automatically). "Auto-map unmapped fields to new target fields" button disabled. "Edit field", "New field", "Auto-new field" buttons are disabled.

Then thought, ok.. maybe my model corrupted.. created a new entity and then found that even "New Target" button is disabled.

Any ideas? What I am missing here? Attached a screenshot with a view presented to me. I do not see any other errors.

Any hints are welcome.

with best regards Mantas

Attachments
Filename File size Added on Approval
llbl.jpg 305,136 24-Feb-2018 20:43.41 Approved
cerberis
User
Posts: 93
Joined: 20-May-2011
# Posted on: 24-Feb-2018 21:11:40   

Interesting enough.. creating completely new LLBLGen project all these things are working... Also if I do import existing project to new project - it works also... However I am not sure how safe is import and if it will not start generating incompatible database scripts...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 25-Feb-2018 09:26:46   

In v5 we introduced 'sync', which integrates model first and database first model <-> relational model data synchronization. Your schema is likely set to 'database', so you can't do model first. Go into 'Sync' (F5) and switch the sync source for the schema to 'model', then simply create your entity and execute the sync task in the Sync tab to create the tables/fields etc. for you simple_smile

https://www.llblgen.com/Documentation/5.3/Designer/Syncingrelationalmodeldata.htm

You got a popup the first time you loaded the v4 project in v5 that the sync sources were set to 'database'. You likely dismissed that popup with 'yeah whatever' wink or forgot all about it.

In v4, even if the relational model data was read from the database, it would still make modifications to it from the model, in v5 this is no longer possible: you work model first / database first or a mixture of both (where tables are synced with the model and the rest is synced with the DB)

Frans Bouma | Lead developer LLBLGen Pro
cerberis
User
Posts: 93
Joined: 20-May-2011
# Posted on: 25-Feb-2018 21:39:14   

Thank you, you are right, sync model was set to database. Would be nice to see some hints also in warning screen maybe.. if model is modified. simple_smile

best regards Mantas