thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Spriegel (Jira)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-4934) Add transient field support
Date Tue, 20 Aug 2019 14:31:00 GMT

    [ https://issues.apache.org/jira/browse/THRIFT-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16911409#comment-16911409
] 

Christian Spriegel commented on THRIFT-4934:
--------------------------------------------

[~calcifer]:  Thanks for the quick response.

Extending might be quite some effort: E.g. if the object (with the transient field) is part
of a another thrift-object. Accessing it from the outside would then require typecasts:
{code:java}
 ((TypeWithTransientField)outerObject.getInner()).setTransientField("myvalue");{code}
 

Thrift makes a lot of things so much simpler. I think such a feature would make work even
more productive :) Furthermore: Even frameworks like JAXB have transient annotations. 

> Add transient field support
> ---------------------------
>
>                 Key: THRIFT-4934
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4934
>             Project: Thrift
>          Issue Type: New Feature
>            Reporter: Christian Spriegel
>            Priority: Minor
>
> It would be great if transient fields could be defined in the schema, which are not serialized
but can be used in the application.
> An example use case for this feature would be a calculated value that is calculated while
loading from the database.
> I am unsure whether these fields would need metadata or if they are simply added as fields+getters&setters. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message