简体   繁体   English

Subsonic 3 ActiveRecord生成问题

[英]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. 当我编译模板时,该文件将存档为.cs(上下文,结构),但是在ActiveRecord中,代码不完整。

It seems that the system Break de compilation at line 5017 and not return any exceptions to me. 似乎系统在第5017行中断了de编译,并且没有向我返回任何异常。

my code stops here: 我的代码到此为止:

 public static PagedList<Veiculoopcional> 

GetPaged(int pageIndex, int pageSize) { return GetRepo().GetPaged(pageIndex, pageSize); GetPaged(int pageIndex,int pageSize){返回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. 我想这可能是我的表格“ VeiculoOpcional”的传输限制或问题。.我不知道。

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). SubSonic不支持复合主键(即多列主键)。 Make the pair ('ID_Veiculo','ID_Opcional') unique, add a new column, and make the new column your primary key. 使该对(“ ID_Veiculo”,“ ID_Opcional”)唯一,添加新列,并将新列用作主键。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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