Skip to main content
March 4, 2022
Question

not-null property references a null or transient value

  • March 4, 2022
  • 10 replies
  • 1 view

Hi,

I am working on a process model to add a new phase to the database. I am getting this error on projectID. I tried all the options mentioned in similar topics discussed here. But not able to fix it yet. 

An error occurred while trying to write to the entity "MD_PM_mdpmphases" [id=87e6bf7a-11e6-4281-a840-a48dbb5c66f3@4551, type=MD_PM_mdpmphases (id=4046)] (data store: MD_PM_Data Store). Details: org.hibernate.PropertyValueException: not-null property references a null or transient value: MDPMMdpmphasesDT3754.projectId Data: TypedValue[it=4046,v={<null>,<null>,<null>,0.32,<null>,yiuroeur,,2022-03-16,2022-03-22,In Progress,PM,PCM,terewtgyreghre,<null>,<null>,<null>}]

My phase table looks likes this;

How to fix it?

Thanks

    10 replies

    stewart.burchell
    March 4, 2022

    Your database table has 'projectid' as a non-nullable value, but the data you've passed to the has this value set to null. 

    March 4, 2022

    Hi Stewart,

    It was null before but I changed it after getting the same error as above. 

    I did what you told me, to but getting the same error. 

    An error occurred while trying to write to the entity "MD_PM_mdpmphases" [id=87e6bf7a-11e6-4281-a840-a48dbb5c66f3@4551, type=MD_PM_mdpmphases (id=4046)] (data store: MD_PM_Data Store). Details: org.hibernate.PropertyValueException: not-null property references a null or transient value: MDPMMdpmphasesDT3754.projectId Data: TypedValue[it=4046,v={<null>,<null>,<null>,0.89,<null>,fdgsdgdsa,terwetg,2022-03-16,2022-03-18,In Progress,PFAM,PCM,rggreghrehreh,<null>,<null>,<null>}]

    My new phase interface. 

    Thanks

    stewart.burchell
    March 4, 2022

    Have you changed the corresponding CDT that you're using to map to this table? There are attributes in the CDT that instruct whether a given data item can be null or not.