Skip to main content
Known Participant
Mar 4, 2022 2:52 PM UTC
Question

not-null property references a null or transient value

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
    Employee
    Mar 4, 2022 2:57 PM UTC

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

    Known Participant
    Mar 4, 2022 3:09 PM UTC

    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
    Employee
    Mar 4, 2022 3:12 PM UTC

    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.