Skip to content

Add Transient annotation to Collections without JPA annotations #421

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

Merged
merged 16 commits into from
Apr 25, 2024

Conversation

evie-lau
Copy link
Contributor

@evie-lau evie-lau commented Feb 20, 2024

What's changed?

OpenJPA -> EclipseLink migration recipe
Add @Transient annotation to Collections without JPA annotations to keep the OpenJPA behavior of ignoring unannotated Collections in EclipseLink

What's your motivation?

https://wiki.eclipse.org/EclipseLink/Examples/JPA/Migration/OpenJPA/Mappings#Unannotated_Collection_Fields

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@evie-lau evie-lau added the recipe Recipe requested label Feb 20, 2024
@evie-lau evie-lau self-assigned this Feb 20, 2024
@evie-lau evie-lau changed the title Add Transient notation to unannotated Collections Add Transient annotation to unannotated Collections Feb 20, 2024
@evie-lau evie-lau marked this pull request as draft February 20, 2024 18:02
@evie-lau
Copy link
Contributor Author

Marking as draft as I realized I may need to modify the recipe criteria from "unannotated Collections" to "Collections without JPA annotations"

@evie-lau evie-lau changed the title Add Transient annotation to unannotated Collections Add Transient annotation to Collections without JPA annotations Feb 20, 2024
@evie-lau evie-lau marked this pull request as ready for review February 20, 2024 19:03
@timtebeek timtebeek removed their request for review March 18, 2024 09:34
github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as outdated.

@openrewrite openrewrite deleted a comment from github-actions bot Apr 25, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@cjobinabo cjobinabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@cjobinabo cjobinabo merged commit ee91666 into openrewrite:main Apr 25, 2024
langchain4j pushed a commit to langchain4j/langchain4j that referenced this pull request Oct 11, 2024
As discussed on
#622 (review),
this PR adds a workflow to automatically review pull requests. The rules
are configurable and can be extended; I'd thought to start small, and
then expand in separate pull requests where I both make the changes to
the project, and add the recipe to the list of suggestions for future
pull requests.

As an example of what this looks like in practice, have a look at
openrewrite/rewrite-migrate-java#421
Notice how we have a bot `github-actions` that places code suggestion
comments that can be quickly applied by the user. This should make for a
reasonably friction-free enforcement of code standards going forward,
using mostly standard components +
https://github.com/googleapis/code-suggester


![image](https://github.com/langchain4j/langchain4j/assets/1027334/b29e0357-111c-4d94-b3df-e15c672330b2)


I'll self review with a few small callouts below, just to make review
easier.

Assumes that we first merge my other pull request, such that we don't
get any suggestions for items fixed there.
- #622
jinsihou19 pushed a commit to jinsihou19/langchain4j that referenced this pull request May 12, 2025
As discussed on
langchain4j#622 (review),
this PR adds a workflow to automatically review pull requests. The rules
are configurable and can be extended; I'd thought to start small, and
then expand in separate pull requests where I both make the changes to
the project, and add the recipe to the list of suggestions for future
pull requests.

As an example of what this looks like in practice, have a look at
openrewrite/rewrite-migrate-java#421
Notice how we have a bot `github-actions` that places code suggestion
comments that can be quickly applied by the user. This should make for a
reasonably friction-free enforcement of code standards going forward,
using mostly standard components +
https://github.com/googleapis/code-suggester


![image](https://github.com/langchain4j/langchain4j/assets/1027334/b29e0357-111c-4d94-b3df-e15c672330b2)


I'll self review with a few small callouts below, just to make review
easier.

Assumes that we first merge my other pull request, such that we don't
get any suggestions for items fixed there.
- langchain4j#622
@evie-lau evie-lau deleted the transient branch May 30, 2025 15:12
AImaniadev added a commit to AImaniadev/langchain4j-Java-LLMs that referenced this pull request Jul 10, 2025
As discussed on
langchain4j/langchain4j#622 (review),
this PR adds a workflow to automatically review pull requests. The rules
are configurable and can be extended; I'd thought to start small, and
then expand in separate pull requests where I both make the changes to
the project, and add the recipe to the list of suggestions for future
pull requests.

As an example of what this looks like in practice, have a look at
openrewrite/rewrite-migrate-java#421
Notice how we have a bot `github-actions` that places code suggestion
comments that can be quickly applied by the user. This should make for a
reasonably friction-free enforcement of code standards going forward,
using mostly standard components +
https://github.com/googleapis/code-suggester


![image](https://github.com/langchain4j/langchain4j/assets/1027334/b29e0357-111c-4d94-b3df-e15c672330b2)


I'll self review with a few small callouts below, just to make review
easier.

Assumes that we first merge my other pull request, such that we don't
get any suggestions for items fixed there.
- #622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe requested
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants