Answer the question
In order to leave comments, you need to log in
How to save a text file?
Good afternoon!
I am studying new technologies and now I decided to study JPA and in parallel the ObjectDB database. I managed to complete the connection and requests. But now I want to try to save a text file to the database. When executing the command, an error occurs. Is it possible to save a text file in ObjectDB?
Link to code
Answer the question
In order to leave comments, you need to log in
EMNIP, in order to save a direct file into your BookEntity, for example, then this same BookEntity must have a field for storing the file. The field must be of type byte[] (an array of bytes), and it must also be marked with the @Lob annotation. And then all your saving/reading comes down to writing/reading an array of bytes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question