i have entity "Companies" in my web app

hi
i have entity "Companies" in my web application

i want to create 1 to 1 relationship between Entity "Companies" and Users
but I am seeing this error

Database Upgrade Error
Column 'OSUSR_F96_COMPANIES.ID' exists in database as Long Integer (Autonumber) but the new version is defined as Integer (INT). Database Autonumber columns can not be changed.

Hi Rashed,


Just cut and paste the Companies entity and then re-publish the application module, It should work.


Reason: The database error occurred on publish because you were changing the Entity Definition i.e. on the previous code publish the Companies ID (i.e. PK attribute) was LongInteger Type and AutoIncrement set as Yes, but currently you are changing the data type of the PK Id attribute to some other EnityIDType  i.e. UserID type


Hope this helps you!


Regards,

Benjith Sam

Benjith Sam wrote:

Hi Rashed,


Just cut and paste the Companies entity and then publish. It should work.


Reason: The database exception occurred because you are changing the Entity Definition i.e. on previous code publish the Companies ID was LongInteger Type but currently you are changing the data type to some other EnityIDType  i.e. UserID type


Hope this helps you!


Regards,

Benjith Sam

Please explain me more
What do you mean "cut and paste"



Solution

Hi Rashid,


Sorry for the bad explanation.


Follow the below steps:

1) Copy the Companies Entity

2) Delete the Companies Entity

3) Paste the Companies Entity (Rename the Entity)

4) Publish the Module


Reason for the Error on publish: Found mismatch in the Entity PK attribute definition from the existing table version in the database server on the code publish activity.


Hope this helps you!


Regards,

Benjith Sam

Solution

Benjith Sam wrote:

Hi Rashid,


Sorry for the bad explanation.


Follow the below steps:

1) Copy the Companies Entity

2) Delete the Companies Entity

3) Paste the Companies Entity (Rename the Entity)

4) Publish the Module


Reason for the Error on publish: Found mismatch in the Entity PK attribute definition from the existing table version in the database server on the code publish activity.


Hope this helps you!


Regards,

Benjith Sam

Thank you

it's working

Best regards


Rashed khalel wrote:

Thank you

it's working

Best regards

You are welcome, Rashed :)

Glad I could be of help!


Regards,

Benjith Sam