<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Which data-type can we use to save a file to a database using the IvyPersistence?</title><link>https://answers.axonivy.com/questions/1336/which-data-type-can-we-use-to-save-a-file-to-a-database-using-the-ivypersistence</link><description>&lt;p&gt;Currently we are trying to write a file to the database using Ivy's persistence API - which data-type can we use to achieve this or do we have to use a plain SQL-Step?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1336/which-data-type-can-we-use-to-save-a-file-to-a-database-using-the-ivypersistence" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 29 May 2015 17:03:01 -0400</lastBuildDate><item><title>Answer by Dominik Regli</title><link>https://answers.axonivy.com/questions/1336/which-data-type-can-we-use-to-save-a-file-to-a-database-using-the-ivypersistence/1347</link><description>&lt;p&gt;I followed this &lt;a href="http://www.codejava.net/frameworks/hibernate/hibernate-binary-data-and-blob-mapping-example"&gt;example&lt;/a&gt; with the &lt;code&gt;byte[]&lt;/code&gt; variant.
The only drawback: I had to write the entity class by myself, because &lt;code&gt;byte[]&lt;/code&gt; is not supported by the entity class editor. &lt;/p&gt;
&lt;p&gt;Have also a look at &lt;a href="http://answers.axonivy.com/questions/1001/xpertivy-sql-how-can-i-write-a-file-in-a-sql-db"&gt;this Q&amp;amp;A entry&lt;/a&gt;  - it's about the same topic.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominik Regli</dc:creator><pubDate>Fri, 29 May 2015 17:03:01 -0400</pubDate><guid>https://answers.axonivy.com/questions/1336/which-data-type-can-we-use-to-save-a-file-to-a-database-using-the-ivypersistence/1347</guid></item></channel></rss>