Solved

Origin model version is not set

  • 10 September 2023
  • 3 replies
  • 44 views

Userlevel 5
Badge +12

Hi, 

Last week I had some issues with a deployment (outside of SF). Because of that I had to delete the latest version, and my merge session with it. My work was still in my branch. 
Now when I want to merge my branch into main, there is no Origin Model version. 
When I select other branches (that work fine - merging both ways) - it is set. I assume this is the problem for my error 

“The INSERT statement conflicted with the FOREIGN KEY constraint "ref_model_vrs_merge_session". The conflict occurred in database "ITP_SF", table "dbo.model_vrs".”

 

 

It would be very, very nice to not loose the branch since there is quite some work in it. 
Any advice is welcome! 

Blommetje  

icon

Best answer by Blommetje 11 September 2023, 08:53

View original

This topic has been closed for comments

3 replies

Userlevel 7
Badge +23

Hi,

Which platform version are you on and have you deleted any model versions in your MAIN?

Maybe I can find some time tomorrow to look into it, quite busy at the moment 😅

Userlevel 5
Badge +12

Hi, 

 

Yes, I did delete the version of the main after the merge. I think this caused it.

I set a version_id (timestamp) from the main branch that made sense somewhere, right before my merge. Set this in the db directly. Then I could merge main into my branch. 


I tried fixing it through SF which is for me impossible. After some searching, trial and error I did the direct fix, and it worked. Have not merged my own branch into main, but I assume all is ok now. 

SF version is 2023.1.12.

So, a check must be made that if a main version is removed after merging, with branch still alive, it is re-set or not a read-only field anymore.. 

Blommetje

Userlevel 7
Badge +23

Great that you've been able to solve it. We did make the necessary improvements to Model versions in 2023.2, by introducing types. This will ensure that any generated model version cannot be removed as the may be needed for processes such as Merging.

For example: 

Model version types

 

Sidenote, whilst I can understand the confusion about versions, the Platform version cannot be 2023.1.12 as of now as we do not release minor versions for the SF and IAM.

In the top left corner, opening the about screen by clicking on the button will show you the correct GUI / Platform version in the Windows GUI: