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

ToMany: orderASC is case sensitive/should be customizable #535

Open
Scrounger opened this issue Dec 13, 2016 · 2 comments
Open

ToMany: orderASC is case sensitive/should be customizable #535

Scrounger opened this issue Dec 13, 2016 · 2 comments

Comments

@Scrounger
Copy link

I have a classA ToMany classB relation, with ordering ASC by a String in ClassB generated by the generator.
If i call classA.getClassB list, the objetcs are ordered case sensitive, like the result below

  • BMW
  • Mercedes
  • iMpala

Is there a way to set orderASC to insensitive?

@greenrobot-team
Copy link
Collaborator

greenrobot-team commented Jan 9, 2017

Huh, looks like specifying a custom collation is currently not possible when using the @OrderBy("date ASC") annotation.

The greenDAO generator (and probably therefore the plugin) only understand ASC and DESC types of Order when building DAOs (generator.ToManyBase#orderAsc()). Though there is generator.PropertyOrderList#addOrderRaw(), but it is unused.

The relevant plugin code is in codemodifier.FunsKt#parseIndexSpec, it falls back to ASC if the order string is not supported.

I adjusted the title accordingly. -ut

@greenrobot-team greenrobot-team changed the title ToMany: orderASC is case sensitive ToMany: support orderASC is case sensitive/should be customizable Jan 9, 2017
@greenrobot-team greenrobot-team changed the title ToMany: support orderASC is case sensitive/should be customizable ToMany: orderASC is case sensitive/should be customizable Jan 9, 2017
@Scrounger
Copy link
Author

@greenrobot-team:
Is is it planed to fix this in a future release?

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

2 participants