Error inserting into table with composite_primary_keys

1

I'm programming with the version 2.3.5 of ruby, the version of activerecord-sqlserver-adapter (5.1.6) and the gem: composite_primary_keys (10.0.2) , and when inserting in a table nn, with its primary keys defined with the gem it gives me the following error:

  

Invalid column name 'nCodLinData, nIdVPN, nIdVLan'

These 3 columns are what make up the main key. I know that the problem is that it internally misconstrues the primary key, but is there a solution for the versions I have specified above?

the code that throws me the error is the following:

result = LinDatosVpnVlan.new( ...... ) result.save

In my model file I have the primary keys defined in this way:

self.primary_keys = [:nCodLinDatos, :nIdVPN, :nIdVLan]

to define the key composed of 3 fields I have the gem composite_primary_keys

    
asked by Sandra 22.02.2018 в 12:06
source

0 answers