Ok, I can reproduce your issue with your table script.
Here is the way how QxEntityEditor get all information from a MS SQL Server database :
1- To get all tables/views :
- Code: Select all
SELECT
table_name,
table_schema,
table_type
FROM
information_schema.tables
WHERE
(table_type = 'BASE TABLE' OR table_type = 'VIEW');
2- To get the primary key of a specific table :
- Code: Select all
SELECT
column_name
FROM
information_schema.key_column_usage
WHERE
OBJECTPROPERTY(OBJECT_ID(constraint_name), 'IsPrimaryKey') = 1 AND
table_schema = 'icore' AND
table_name = 'usergroup';
The query to get the primary key returns empty : that means that this condition doesn't work :
OBJECTPROPERTY(OBJECT_ID(constraint_name), 'IsPrimaryKey')Do you have any idea why this condition doesn't work ?
Do you have a better query to get the primary key of a table ?