开发者

JPA: Store fileAttachment into the database

开发者 https://www.devze.com 2022-12-21 15:38 出处:网络
I would like to know if there is any way I can store a fileAttachment directly into the database with JPA.

I would like to know if there is any way I can store a fileAttachment directly into the database with JPA.

I have an attribute:

public fileAttachement logo;

I have tried to change it to:

@L开发者_如何学Pythonob
public byte[] logo;

But that's not doing what I was expecting.


And a "fileAttachment" is what exactly ? class definition ? DataNucleus provides a flexible way of persisting any type as a String, so depending on your "fileAttachment" you could use that

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号