Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Add @Transient annotaion on the dynamically generated entity field using eclipselink
Add @Transient annotaion on the dynamically generated entity field using eclipselink [message #1697069] Mon, 01 June 2015 11:14 Go to next message
rajni kumari is currently offline rajni kumariFriend
Messages: 1
Registered: June 2015
Junior Member
Hi,
I am using dynamic JPA (eclipselink) to generate the entities classes at runtime. Now in my project I require to add JPA annotation on field(example @Transient annotation on some fields).
I have created DynamicType with a JPADynamicTypeBuilder and call addDirectMapping method to add a field.

Is it possible to apply annotation using eclipselink? If yes then how can I apply @Transient annotaion on the entity field?

Thanks
Rajni
Re: Add @Transient annotaion on the dynamically generated entity field using eclipselink [message #1697240 is a reply to message #1697069] Tue, 02 June 2015 15:49 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
I'm a little lost. @Transient applies to existing fields that you do not want mapped through JPA default mappings, while JPADynamicTypeBuilder addDirectMapping is akin to putting a @Mapping on the field telling it to be mapped. Not calling addDirectMapping for the field is the same as marking it as @Transient, isn't it?

Re: Add @Transient annotaion on the dynamically generated entity field using eclipselink [message #1774031 is a reply to message #1697240] Mon, 09 October 2017 13:52 Go to previous message
Thiagarajan Ramani is currently offline Thiagarajan RamaniFriend
Messages: 1
Registered: October 2017
Junior Member
I have a similar situation where I want to create a dynamic entity type but would like to have a field that is calculated and not stored in the database. But, I haven't been able to mark this field as a transient field. Has anyone figured this out?

Thanks,
Thiagarajan
Previous Topic:Extra criteria on ManyToMany relation
Next Topic:JPA - String attribute linked to xml type column
Goto Forum:
  


Current Time: Fri Apr 26 23:09:18 GMT 2024

Powered by FUDForum. Page generated in 0.03019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top