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
Post a Comment