-
Notifications
You must be signed in to change notification settings - Fork 199
Add Java Record support in JavaObjectTransformer #824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Java Record support in JavaObjectTransformer #824
Conversation
ced7c51
to
3492a6e
Compare
} | ||
|
||
try { | ||
result = clazz.getDeclaredConstructor(componentTypes).newInstance(values); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to cache it as well to avoid constant calculation logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible to cache object, but I can cache constructor. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, constructor should be enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snuyanzin I have a question for you, imagine an article about Datafaker 2.0, what would you expect to see in that article, I mean topics or something like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends on the target audience...
there is a list of topics missed in faker related talks
- custom providers
- there are ways to generate sequences (stream and sequence)
- the transformation approach (csv, json, sql, java, custom)
- object population as a replacement for builders
- now datafaker is fast enough to generate big test data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could I send you my draft of the article about Datafaker 2.0? I would like to hear your opinion if you don't mind and if you have time, of course
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, sure
Nice feature Illia, amazing work! |
At the moment, Datafaker doesn't support Java Records. This PR addresses this problem