Skip to content
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

_link_ doesn't work as expected for joined resources in tables #14

Closed
rsinger opened this issue Aug 29, 2014 · 5 comments
Closed

_link_ doesn't work as expected for joined resources in tables #14

rsinger opened this issue Aug 29, 2014 · 5 comments
Labels

Comments

@rsinger
Copy link
Member

rsinger commented Aug 29, 2014

If your tablespec has something like:

{
"id" : "t_foo",
"from" : "barCollection",
"joins" : {
    "foo:bar" :  {
        "from" : "fooCollection",
        "fields" : [
           {
                "fieldName" : "fooLink",
                "predicates" : [""],
                "value" : "_link_"
           }]
    }
}
}

"fooLink" will be populated from barCollection._id.r

In searchDocument, it appears that it would correctly populate fooLink from fooCollection._id.r

@rsinger rsinger added the bug label Aug 29, 2014
@scaleupcto
Copy link
Contributor

Should we also consider allowing

{
  "fieldName":"fooLink",
  "value":"_link_"
}

to be functionally equivalent to:

{
  "fieldName":"fooLink",
  "predicates":[""],
  "value":"_link_"
}

@rsinger
Copy link
Member Author

rsinger commented Aug 29, 2014

I'm not sure I'm familiar enough with tripod to answer that.

The current behavior, as I understand it, is that "predicates" is always required. It seems like you're satisfying that requirement by supplying a "value". What happens if "value" is something other than "link"?

@rsinger
Copy link
Member Author

rsinger commented Aug 29, 2014

That said, this conversation seems more appropriate for #15. This issue is really just to align table spec behavior with search spec behavior.

@scaleupcto
Copy link
Contributor

Wherever fixed, predicates:[""] is just boulderdash to fix config validation. Even predicates:["_self_"] would be better. Infact, that would be really nice as you could mix it with other predicates: predicates:["_self_","resourcelists:createdBy"]

@scaleupcto
Copy link
Contributor

Can this be closed?

@rsinger rsinger closed this as completed Sep 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants