Generate Model -> Specify Schema


I created a custom data store for an MSSQL database but when I go to “Generate Model” to create entities for the tables there the window shows “Schema: DBO” and the field cannot be edited.

How can I specify the schema for the “Generate Model” window?

The Generate Model feature doesn’t have the ability to import tables from non-current schema.
You have to specify schema in the data store connection settings, and then run “Generate Model”.

I think that after import you can change data store connection settings back, and then manually change all definitions of the imported entities, use @Table(name = "...", schema="schema_name"), such entity definitions should work in the runtime.

The improvement ticket exists BTW:

At least on MSSQL you cannot set the schema on the connection string. It always connects to dbo and you access other objects via dot notation (my_schema.my_object).

I am simply writing the whole path to the @Table(name="dbo_whatever.my_table", ...) which is valid for MSSQL and just works.

For the moment I am writing the entities myself, there are not too many anyway.

The improvement ticket exists BTW: