I'm adding a property to existing DTO. The property is intended to be used only from the database. It means it will be stored only. There will be no usages of it across our application. It is needed for our Product Owner to make reports. I would like to make it store-only i.e. to be stored but never retrieved from the database. Is there such an opportunity in JPA/Hibernate? Thanks for any help!
-
Did'nt quite get you?What do you really want to achieveAkshay– Akshay2017-02-16 08:45:32 +00:00Commented Feb 16, 2017 at 8:45
-
@Akshay I would like to store a property to database but never being retrieve it by the app.Dmitry Senkovich– Dmitry Senkovich2017-02-16 08:46:42 +00:00Commented Feb 16, 2017 at 8:46
-
Ok..It can be easily achieved.Just make a PoJo class map it and never call it.Just store it..as in just keep setting and never call get..Hope you got itAkshay– Akshay2017-02-16 08:48:01 +00:00Commented Feb 16, 2017 at 8:48
-
@Akshay Thanks, I'm just being stupid today. I've just implemented it. lazy fetch type + no getterDmitry Senkovich– Dmitry Senkovich2017-02-16 09:02:25 +00:00Commented Feb 16, 2017 at 9:02
Add a comment
|