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

Search Function for Collection - Map #70

Open
GoogleCodeExporter opened this issue Dec 18, 2015 · 3 comments
Open

Search Function for Collection - Map #70

GoogleCodeExporter opened this issue Dec 18, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Quick question: does the framework support search function on Map type 
property, for example, we have an entity A which has a property Map<String, 
String> m, then I want to filter A base on the key of the map m, is there a way 
to do it, I tried m.key, but it didn't work. I searched the posts here, and it 
says "Filtering on collection properties with SOME, ALL, and NONE is 
implemented in 0.4.2.", but are they only for List type?

If I post this in the wrong place, please correct me, I haven't found any other 
place to post question, sorry in advance.

By the way, it is an awesome framework, especially the search function, one of 
my favorite frameworks now.

Thank you very much.
RetRo

Original issue reported on code.google.com by RetRo.Li...@gmail.com on 6 Oct 2010 at 1:35

@GoogleCodeExporter
Copy link
Author

No I don't think think the framework supports this yet. HQL does apparently 
support it as follows:

"You can use HQL built-in function: index() eg.

select item, index(item) from Order order 
join order.items item
where index(item) = 'foobar'

where order.items is Map"
-- http://forum.springsource.org/archive/index.php/t-32224.html

By the way, the best place to post questions is here: 
http://groups.google.com/group/java-generic-dao. That's the discussion group 
for the framework. But I'll leave this here since it's a good feature 
suggestion.

Original comment by dwolvert on 6 Oct 2010 at 1:03

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Developer note:

Use ".index" just like ".size". But maybe both of these need to be adjusted so 
they don't step on legitimate properties "index" and "size".

Original comment by dwolvert on 7 Oct 2010 at 1:30

@GoogleCodeExporter
Copy link
Author

I will try it out, thank you so much, it would save me a lot of work if it 
works.

Original comment by RetRo.Li...@gmail.com on 9 Oct 2010 at 3:55

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

No branches or pull requests

1 participant