Skip to content

Issue 1012 (token endpoint performance) #1013

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

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update ApprovedSite.java
Deprecated approvedAccessTokens and made mapping bi-directional
  • Loading branch information
strangeweaver committed Feb 2, 2016
commit 8c1e7c8335d15f07cd1b85ad08e91c7ac0fc9629
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,25 @@ public boolean isExpired() {
}
}

@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
@JoinColumn(name="approved_site_id")
/**
* @deprecated should not be used for performance reasons also we don't maintain
* the bi-directionality in the code so could lead to in memory inconsistencies
* instead use {@code OAuth2TokenRepository.getAccessTokensForApprovedSite}.
*/
@Deprecated
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy = "approvedSite")
public Set<OAuth2AccessTokenEntity> getApprovedAccessTokens() {
return approvedAccessTokens;
}

/**
* @param approvedAccessTokens the approvedAccessTokens to set
*
* @deprecated should not be used for performance reasons also we don't maintain
* the bi-directionality in the code so could lead to in memory inconsistencies
* set the approvedSite on the relevant {@code OAuth2AccessTokenEntity}.
*/
@Deprecated
public void setApprovedAccessTokens(Set<OAuth2AccessTokenEntity> approvedAccessTokens) {
this.approvedAccessTokens = approvedAccessTokens;
}
Expand Down