Order ToMany objects
See original GitHub issuei think just like greendao for toMany relation need @OrderBy
annotation
example :
@Entity
public class Customer {
@Id private Long id;
@Backlink(to = "customerId")
@OrderBy("date ASC")
private ToMany<Order> orders;
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Too Many Objects (TMO) Episodes: 1-11 - YouTube
Too Many Objects (TMO) Episodes: 1-11. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly, ...
Read more >django order by count of many to many object - Stack Overflow
Annotate Category objects with the number of questions and then order by this number in descend order: from django.db.models import Count ...
Read more >Ordering To-Many Associations - ORM - Doctrine
Ordering To-Many Associations · @OrderBy acts as an implicit ORDER BY clause for the given fields, that is appended to all the explicitly...
Read more >ToMany (ObjectBox Java 3.1.3 API)
Object. io.objectbox.relation.ToMany<TARGET> ... public class ToMany<TARGET> extends java.lang.Object ... Set an comparator to define the order of entities.
Read more >Many-to-many relationships - Django documentation
To define a many-to-many relationship, use ManyToManyField . In this example, an Article can be published in multiple Publication objects, and a Publication ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@greenrobot i found OrderBy annotation in source code, sorting is implement or not yet ?
Since
1.0.1
there is an experimental feature to set a comparator on theToMany
that orders its items:Let us know what you think.
edit: Note that support for SQL like order statements (like
date ASC
) is unlikely, as ObjectBox is not a SQL-based database. It is based on objects. -ut