Table name in 4.3 Plugin Upgrade

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 年 前
Hey guyz,

i am currently porting my custom job database plugin to 4.3 from 3.6. I managed to port it to 4.1 but now i am having trouble. how do i make sure that NopEntityBuilder points the right table in the database as it is already existing.

for example.

The table name is Jobdatabase , but the record class is jobdatabaserecord do i need to rename the record class to match the database?

Thanks In Advance.
3 年 前
Hello Budinga
Please go with below link, I hope you get your solution.
https://www.nopcommerce.com/en/boards/topic/82004/custom-name-for-database-table#265260
3 年 前
SagarKayasth wrote:
Hello Budinga
Please go with below link, I hope you get your solution.
https://www.nopcommerce.com/en/boards/topic/82004/custom-name-for-database-table#265260


Thank you so much. I will try it tonight and see if that works. Much apreciated. it does look like what i was looking for.
3 年 前
Budinga wrote:
Hello Budinga
Please go with below link, I hope you get your solution.
https://www.nopcommerce.com/en/boards/topic/82004/custom-name-for-database-table#265260

Thank you so much. I will try it tonight and see if that works. Much apreciated. it does look like what i was looking for.


Seems to have fixed my problem thank you. But i am now getting another issue when trying to insert new records.

System.Data.SqlClient.SqlException: 'Cannot insert explicit value for identity column in table 'JobDatabase' when IDENTITY_INSERT is set to OFF.'

I cant change the database as its an existing upgrade so im a bit confused as to why suddenly this is happening. Worked perfectly up to 4.1

Any ideas will be greatly appreciated.
3 年 前
Budinga wrote:
Hello Budinga
Please go with below link, I hope you get your solution.
https://www.nopcommerce.com/en/boards/topic/82004/custom-name-for-database-table#265260

Thank you so much. I will try it tonight and see if that works. Much apreciated. it does look like what i was looking for.

Seems to have fixed my problem thank you. But i am now getting another issue when trying to insert new records.

System.Data.SqlClient.SqlException: 'Cannot insert explicit value for identity column in table 'JobDatabase' when IDENTITY_INSERT is set to OFF.'

I cant change the database as its an existing upgrade so im a bit confused as to why suddenly this is happening. Worked perfectly up to 4.1

Any ideas will be greatly appreciated.



Ok i fixed it by removing the iD column. And also removing the Job Id from the record definition class which now translates to Id.  Still got allot to port but at least now im on my way.

Thanks Again for the help.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.