Skip to Content
author's profile photo Former Member
Former Member

Some attribute values are coming as null, When I try to fetch the model immediately after saving into DB

We have a requirement in punchout.

Punchout system will send a request to hybris in the form of CXML. In header part of the CXML contains punchoutCredential. We have to authenticate the credential in hybris whether credential is valid Credential or not.

In one scenario if the credential is not available in hybris,we need to create PunchoutCredential on the fly and need to do authentication.

Immediately after saving punchoutcredential I'm trying to fetch the same for authentication. I can able to fetch the punchoutCredentialModel but inside that some attributes are coming as null.But those values are there in DB,I have checked via HMC.

Can you please suggest Why those attribute values are coming null and How to resolve it?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on May 22, 2019 at 08:14 PM

    Hi - please try calling ModelService.refresh(punchoutCredentialModel) before fetching the punchoutCredentialModel.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.