문제

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 (i.e. multiple column primary keys). Make the pair ('ID_Veiculo','ID_Opcional') unique, add a new column, and make the new column your primary key.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top