Master/Detail page: No schema found

Hello,

I add new page "Master/Detail" Grid
But I can not select a page schema because it says "no results found"

Schema must be available because I have execute "infer schema" successfully and generated pages and can run application.
Why Master/Detail page does not find schema ?

Hi,

Can you check if you have primary keys for your tables?

Best Regards,
Vladimir

Yes, I have primary keys (CRUD is working)

Do you have any foreign keys?

OK...found Problem.... I need to define one-many relationship for the tables

I'm having the same issue and I already have the foreign key properly created on the detail table. I'm using MySQL, can that be the problem?

EDIT: CRUD pages are generated as expected, with the lookup working well.

Can you post your schema as SQL script to test it locally?

Sure, here goes a simplified version of it:

CREATE TABLE IF NOT EXISTS company (
Id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(50) NOT NULL,
Phone varchar(15) DEFAULT NULL,
Email varchar(250) DEFAULT NULL,
Address text,
Notes text,
CreationDate datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (Id),
KEY Name (Name),
KEY Email (Email)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS project (
Id int(11) NOT NULL AUTO_INCREMENT,
CompanyId int(11) NOT NULL,
Name varchar(100) NOT NULL,
Notes longtext,
CreationDate datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (Id),
KEY CompanyId (CompanyId),
CONSTRAINT FK_Company FOREIGN KEY (CompanyId) REFERENCES company (Id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

I've tried to replicate this however everything worked normally:




I tested creating the tables with different names and it worked.
Then I thought "maybe it wasn't working because I had already create the CRUD pages", but then I saw that the schema was show again for the new table and not the old.
The only difference is that my original tables has "" (underscore) in the middle of the name, but then I tested with new tables with "" too, and it worked.
I checked the schema file MySQL.json and the relations appear fine, except the last "field" for the projects array. The original table doesn't have it.
Am I doing something wrong on updating the schema?
image

Yes, sorry, I was not checking the last field "Projects" when inferring/updating schema.

EDIT: Just another detail to explain what happened: When I first created the tabled and inferred the schema in radzen, I hadn't create the foreign key. I did that later.