-
Notifications
You must be signed in to change notification settings - Fork 228
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
@Join and JoinPath #1185
@Join and JoinPath #1185
Conversation
...atastore-aggregation/src/main/java/com/yahoo/elide/datastores/aggregation/core/JoinPath.java
Outdated
Show resolved
Hide resolved
...gregation/src/main/java/com/yahoo/elide/datastores/aggregation/metadata/enums/ColumnTag.java
Outdated
Show resolved
Hide resolved
...ggregation/src/main/java/com/yahoo/elide/datastores/aggregation/metadata/enums/TableTag.java
Outdated
Show resolved
Hide resolved
...aggregation/src/main/java/com/yahoo/elide/datastores/aggregation/metadata/models/Column.java
Outdated
Show resolved
Hide resolved
...-aggregation/src/main/java/com/yahoo/elide/datastores/aggregation/metadata/models/Table.java
Outdated
Show resolved
Hide resolved
...gation/src/test/java/com/yahoo/elide/datastores/aggregation/example/PlayerStatsWithView.java
Show resolved
Hide resolved
* @param entityBinding EntityBinding instance | ||
*/ | ||
public void bindEntity(EntityBinding entityBinding) { | ||
Class<?> declaredClass = entityBinding.entityClass; |
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.
Why not have this method call the new bindEntity method with an empty set (or a set that includes Exclude)?
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.
This bindEntity
method needs to keep all information from the existing binding, as the hiddenAnnotations
are not tracked in EntityBinding
, if we bind the class again in a different dictionary, previous hiddenAnnotations
would not be applied.
@@ -178,6 +178,13 @@ | |||
<version>2.5.0</version> | |||
<scope>test</scope> | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>org.apache.ant</groupId> |
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.
Why do we need ant?
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.
Used for reading in graphql expected response from json file.
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'd rather not add a dependency on ant in Elide. There are other places in Elide where we slurp in files. Let's just do the same approach.
@Exclude | ||
@ToString.Exclude | ||
private final Map<String, Column> columnMap; | ||
|
||
public Table(Class<?> cls, EntityDictionary dictionary) { | ||
if (!dictionary.getBindings().contains(cls)) { | ||
if (!dictionary.getBoundClasses().contains(cls)) { |
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.
If Table is going to be a simple POJO - we probably don't need to pass dictionary to it. This will also simplify the Fili integration.
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.
If using all argument builder, there is not need to provide a dictionary. Fili can use that.
Resolves #1005
Description
@Join
annotation forTable
to use to join to other tables or entities.JoinPath
which is a path but can navigate through models using@Join
annotation.TableTag
andColumnTag
.EntityDictionary
to allow hiding a field from API.How Has This Been Tested?
unit tests and integration tests.
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.