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 ?
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 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?
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.