The unique constraints mentioned above didn't delete themselves although they were no longer needed by the model. I had tried all combinations of saving, validating, running update scripts, running create scripts and they kept coming back.
It was only when I went to the Catalog Explorer and toggled the deletion flag there then created a create script that I had a database without them.
Warning: The following is a loose collection of thoughts some which may seem critical and also so ill-ordered it might be considered a ramble.
Just remember that no matter what, I still like using LLBLGen and made it my first choice.
It's very low maintenance.
I have already mentioned it before but where I am now development-wise. I want to just add fields on the Fields tab and not even need to look at the Field mappings tab. I then want to run a Create script and/or Update script and regen the code and that be it.
I get confused (I'm getting older!) with Sync selected, Edit Field, New Field, AutoField and AutoMap context menu things. I just want the database to be synced with the model I have just changed. I have to do one of these so it feels like a change twice.
I don't want to have the fields in the database be created in a different order than those in the Fields list. I want ID first always and I want Answer1, Answer2, Answer3 etc. in that order because that's how I created them and it looks silly when they are not in that order.
Yet I look at an entity where everything is in the right order; I look at the Field mapping tab and they are still in the right order but the Catalog Explorer has them in reverse order and so that is how they get created in the database. How they got like that I have no idea
So I have to remember to Set Field Order before creating Field Mappings and even then I am convinced that the Field Mappings come out differently but I can't work out under what circumstances. If I forget then I have to reorder them and then create the fields so it feels like twice again.
When I create a new field and type 'str' for string as the type and press Ctrl-Enter ready for the next, I have to start again because I forgot to press tab and the value isn't set until I do. (If this is a DevExpress grid BTW there is an option to post the edit on close which would solve this problem). Sure 'don't forget to hit tab!' is the obvious answer but I do and have to repeat the operation - hence twice.
Validation: Do I need the tick icon or the tick-database icon or both. I can't remember so I do both to be on the safe side - validation twice.
That's why I mentioned 'doing things twice'. I'm sure some of things are my fault but not all.
Indexes aren't a model concern, but a data concern, and used for performance optimizations at runtime. I.o.w.: it's silly to define them in the model as you don't know the runtime characteristics of the model as there's no data involved in the model. If you could define things in the relational model data it might be 'convenient' but it would actually make totally no sense at all, as there's no basis to define an index on field ABC in a model without data.
This sounds a bit theoretical to me and so I am definitely out of my depth there.
What is the point of a Model definition if there is no ultimate persistence of data. None really?
An RDBS is one type of data store that could be applied to a model. Sure there might be others but I don't have any use for them and LLBLGen just has support for RDBS anyway (AFAIK).
What is Relational Model Data anyway. I can see you support multiple RMD for a given model simultaneously but I would imagine that 99% of users want to use their single chosen RDBS.
I wasn't suggesting that Indexes be supported on the Model but on the chosen Relational Model Data which until your comment, to me was just a visualization of the RDBS. You seem to suggest that an RMD is an independent Data Model. So where I was thinking Model->RDBS you are thinking Model->RMD->RDBS where RMD is an abstract concept that shouldn't be contaminated with 'data' or 'data-related' concepts such as an index.
I now have two 'models' where I thought I had one. And I still will have to manually play with the database to make it work properly.
I would argue that since my RMD is defined in in a tree under a_ SQL Server node_ then it would be eminently reasonable to assume that it represented the database in SQL Server. Taking that a step further the creation of indexes on an RDBS here, being an essential part of making a useful working system, would be very convenient indeed. If you have no plans in this direction for future version then I find that unfortunate.
You mentioned that it might be 'convenient' but would actually make no sense at all. I disagree with that as it seems to make perfect sense to me. But it seems to be opposite thinking from what happens with the 'other Model' in that you can add all sorts of Settings, Custom properties, Attribute, Namespaces, Interfaces - all of which are not needed by the Model per se but are there because they are a 'convenient' way of setting them up and having a script and/or code use them further down the line. Why is marking a field or fields as requiring an index so different that it becomes an abomination to suggest it?
To me its all about the data. LLBLGen my preferred way of defining the structure of that data and generating code to deal with that data structure. Model-first seems a convenient way of defining the structure without having to use MSSMS then import it then generate code. I know I will still have to use MSSMS to define indexes currently but I always expected that LLBLGen would incorporate more of its functionality to make it a one-stop shop. Seems I was wrong about that and that was never the intention so I'm wondering whether I should go back to Database first and just use LLBLGen to generate code as the Model-part (two parts really with RMD) will only ever be an abstraction that shows part of the overall work but treats data as 'none of its concern'.
Cheers
Simon