0

I am displaying values on my jsp page using hibernate . I have oracle database. But if there is no value in any column in a table .so while displaying on jsp its displaying it as null. I wanted to remove null and place "" in place of that. Do i need to do it something from hibernate ?

2 Answers 2

1

Hibernate have something like Custom User Type

Here you have an example of getting name of enumeration an transform this name to enum: https://community.jboss.org/wiki/UserTypeForPersistingATypesafeEnumerationWithAVARCHARColumn

It's very easy to change this example to work with strings.

Sign up to request clarification or add additional context in comments.

Comments

0

compare value with !=null then assign empty; ie.

      String value = value !=null ? value : "";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.