Duplicate CREATE table in Database Creation

Hi there!

I am running on the following problem:

I have some entity/table classes defined. I made the overall structure using the "DBConnection" class as example.

When starting the app for the first time I go for creating the database (sqlite).

However when TDatabaseManager.BuildDatabase is executed it causes an exception ESQLiteException table dominio already exist

Debuging TDatabaseManager.ExecuteSQLStatements I see there is a list of the SQL create tables, all my tables are there, however there is one duplicate. The first table is duplicated at the end. (2 creates)

The tables created are correct, everything fine. However only this exception.

What am I doing wrong to cause this?


looking further on this problem I found where it is:

I have moved one entity class from one unit to another, however I have not removed the previous code. So Aurelius correctly was trying to create 2 tables since it had 2 class defined with the same table name.

I wonder if Aurelius could verify that and throw a specific exception on this case, to be more newbie proof ... :)

Thank you 

Yes, there are many checks that we could add in the mapping setup to help users. It's a feature to be implemented in a future version indeed.