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

Nulls are always first when sorting by association attribute by instance name #121

Closed
IskandarovRost opened this issue Sep 17, 2020 · 1 comment
Assignees
Labels
state: fixed Fixed by the developer type: bug Something isn't working
Milestone

Comments

@IskandarovRost
Copy link

Environment

  • Platform version: 7.2.8(7.2.9)

Description of the bug or enhancement

See "When sorting by an Association field use the instance name rather than the id" #108

  • Minimal reproducible example
  1. there is an entity with a link to another entity.
    The another entity has instance name defined
@Table(name = "LIBRARY_NEW_ENTITY")
@Entity(name = "library_NewEntity")
public class NewEntity extends StandardEntity {
    private static final long serialVersionUID = -491449145451121237L;

    @Column(name = "NEW_FLD")
    private String newFld;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "BOOK_ID")
    private Book book;
  1. Create a view which includes the link attribute
 <view entity="library_NewEntity" name="newEntity-view" extends="_local">
        <property name="book" view="_local">
            <property name="literatureType" view="_minimal"/>
            <property name="authors" view="_minimal"/>
        </property>
    </view>
  1. Create frontend module and frontend management for the entity with the link
  2. then create several instances of both the entities
  3. leave the link empty in several instances
  4. Check sorting in the table
  • Expected behavior
  • Actual behavior
    The string with empty link is always on top (not regarding ascending or descending):
    image.png
    image.png
@IskandarovRost IskandarovRost added the type: bug Something isn't working label Sep 17, 2020
@knstvk knstvk added this to the Release 7.2 milestone Sep 21, 2020
@andreysubbotin andreysubbotin assigned plakhov and unassigned t2-cuba Oct 5, 2020
plakhov added a commit that referenced this issue Oct 9, 2020
@plakhov
Copy link
Contributor

plakhov commented Oct 9, 2020

Actual behavior reproduces only in React UI.
Project for reproduce
https://app.zenhub.com/files/176701911/b45cb6c0-7c84-4586-98ec-3add254b4150/download

@natfirst natfirst self-assigned this Oct 9, 2020
@natfirst natfirst added the state: fixed Fixed by the developer label Oct 9, 2020
@natfirst natfirst closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: fixed Fixed by the developer type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants