简体   繁体   中英

Subsonic 3 ActiveRecord generation problem

I´m newer user in stack overflow and my english i´snt so good i hope you understand my trouble.

when I´m compiling my template this archives .cs it´s ok (Context, Structs), but in the ActiveRecord the code comes incomplete.

It seems that the system Break de compilation at line 5017 and not return any exceptions to me.

my code stops here:

 public static PagedList<Veiculoopcional> 

GetPaged(int pageIndex, int pageSize) { return GetRepo().GetPaged(pageIndex, pageSize);

  } public string KeyName() { return " 

i guess this probably a limit of transmition or problem with my table "VeiculoOpcional".. i don´t know.

Any way this the strcture of the table:

CREATE TABLE `veiculoopcional` (
   `ID_Veiculo` int(11) NOT NULL,
   `ID_Opcional` int(4) NOT NULL,
   PRIMARY KEY (`ID_Veiculo`,`ID_Opcional`),
   KEY `FK_veiculoopcional_Opcional` (`ID_Opcional`),
   CONSTRAINT `FK_veiculoopcional_Opcional` FOREIGN KEY (`ID_Opcional`) REFERENCES `opcional` (`ID_Opcional`) ON DELETE NO ACTION ON UPDATE NO ACTION,
   CONSTRAINT `FK_veiculoopcional_Veiculo` FOREIGN KEY (`ID_Veiculo`) REFERENCES `veiculo` (`ID_Veiculo`) ON DELETE NO ACTION ON UPDATE NO ACTION
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

Anybody had or passed by this same problem ? i don´t found any refference in net

Many Thanks.

SubSonic does not support composite primary keys (ie multiple column primary keys). Make the pair ('ID_Veiculo','ID_Opcional') unique, add a new column, and make the new column your primary key.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM