java - how to read my blob column from mysql to string type in hibernate -


How to type the string from mysql to my Blob column in hibernation

I try this way But Alway me back: [B @ 196F4B5

  Article Article 2 = f.daoArticle.findById (article.getSrcUrl ()); String vbody = article2.getArticle (); Println (vbody); \ Hbm end lieutenant; Class catalog = "eriso" name = "colvord.rice.dav.artical" table = "article" & gt; & Lt; Id name = "srcUrl" type = "java.lang.String" & gt; & Lt; Column length = "200" name = "SrcUrl" /> & Lt; Generator class = "assigned" /> & Lt; / Id & gt; & Lt; Property column = "paragraph" generated = "never" lazy = "false" name = "article" type = "text" no-null = "true" length = "10485760" /> & lt; / Square & gt; \\  

Anybody help? I took 3 hours !!!

I suggest that you check the following page from interwibes:

< / P>

This describes the creation of a custom hibernate user-bit to map CLOB / BLOB to a string.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -