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

can i filter my link field? #7967

Closed
jhonny111s opened this issue Dec 26, 2017 · 4 comments
Closed

can i filter my link field? #7967

jhonny111s opened this issue Dec 26, 2017 · 4 comments
Assignees
Labels

Comments

@jhonny111s
Copy link

jhonny111s commented Dec 26, 2017

OrientDB Version: 2.2.26

Java Version: 1.8

OS: opensuse

I have a class category and contain a products linkmap (Product) field, when i search categories need get products but filtering, only five records or only status = true, '@Rid' = ·· etc

what happen if created another class CategoryProducts instead linkmap?

I try with:

  • all categories with only five products
    select products.values()[0-4] from category fetchplan products:1 //don't works
@luigidellaquila
Copy link
Member

Hi @jhonny111s

I'm not sure I got exactly what you are trying to achieve. Could you please post a simple script to populate your domain and data model?

Thanks

Luigi

@jhonny111s
Copy link
Author

jhonny111s commented Dec 27, 2017

{
@Class: Category
name: category name
products: [#14-01, #14-02, #14-03]
subcategories : [#15-01, #15-02]
}

this is my query to filter products:
select $temp as products, name, image, categories.values(), pointSales.slug from Category
Let $keys = products.values().@Rid, $temp = (select * from product where @Rid in ( $keys ) and status = true limit 5)
where status = true fetchplan products:1 image:1

@jhonny111s
Copy link
Author

i found this query
is the best way to make te query?

select products.values()[0-5][status=true] from Category fetchplan products:1

why doesn't work: products.values()[status=true] [0-5]

@luigidellaquila
Copy link
Member

Hi @jhonny111s

I'd say it's a bug, I'll try to check it as soon as I can

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants