Export to Aurelius create/update tables

Hi,
  When exporte to Aurelius, there some new tables(create table), and there are some updated tables(alter table) in the database sheama. If i use BuildDatabase exception is raised ('...Table already exist.'). If i use UpdateDataBase the new tables are not created. How can i create tables and update tables?
 Thanks, Jofan

BuildDatabase indeed will create all tables so if any table exists, an error will be raised.

But UpdateDatabase should work (at least, it should create new tables). Some Alter Table statements are not supported, you can check if UpdateDatabase returned any issues, checking errors and warnings generated by it, according to this topic: http://www.tmssoftware.com/business/aurelius/doc/web/index.html?schema_validation.htm

I Wagner, if you try export a database schema with DataModeler, and updatedatabase with aurelius, does't work, try please...
Many thanks.

Can you provide your data modeler project with current aurelius export settings so we can test it here?

I solve my problem, registing every Table (Class) like this:

class procedure TDBSchemaRegister.RegisterEntityClasses;
var Setup: TMappingSetup;
begin
  Setup := TMappingSetup.Create;
  try
    Setup.MappedClasses.RegisterClass(TUserX);
    TMappingExplorer.ReplaceDefaultInstance(TMappingExplorer.Create(Setup));
  finally
    Setup.Free;
  end;
end;

It's not the best way, i know, every time add a new table and export to aurelius, i have to add code :(
thanks

This is because you didn't use the classes in your application, thus the linker removes the classes from it. If you have a real application, the classes will be used from code, and you wouldn't need to register them.

sorry, i don't understand, how can i do that? as i said before "... If i use UpdateDataBase the new tables are not created...."

Suppose you have a class TCustomer declared in a unit exported by Data Modeler. If you don't use that class anywhere in your application, Delphi linker will remove it from the application. There is no way Aurelius could create a table related to the class, because the class simply doesn't exist in the .exe. You have to either remove optimization, or use the class in your application. A simple code like this will solve:


TCustomer.Create.Free;

Ok, make sense. For me is solved.
But would be nice data modeler register the class ;).