jhipster - Should xLOB attributes be in the entity toString method? -




just got surprised when did tostring on entity containing clob: entire huge string got displayed. clobs shouldn't generated in tostring. did test sorts of supported lobs:

entity blobtostring {   ablob blob,   ananyblob anyblob,   aimageblob imageblob,   atextblob textblob } 

all these xlob content tostring (+ content type):

@override public string tostring() {     return "blobtostring{" +         "id=" + getid() +         ", ablob='" + getablob() + "'" +         ", ablobcontenttype='" + ablobcontenttype + "'" +         ", ananyblob='" + getananyblob() + "'" +         ", ananyblobcontenttype='" + ananyblobcontenttype + "'" +         ", aimageblob='" + getaimageblob() + "'" +         ", aimageblobcontenttype='" + aimageblobcontenttype + "'" +         ", atextblob='" + getatextblob() + "'" +         "}"; } 

in code there condition add content type (if it's byte[]). content type should thing display in tostring, not content itself.

wdyt ?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -