How to prevent sorting on a given column?












1















My repository allows for sorting on any column when retrieving a list of users:



public interface UserRepository extends JpaRepository<User, Long>, UserRepositoryCustom {

@Query("SELECT u FROM User u")
public Page<User> all(Pageable page);

}


The trouble is that a user has some properties that cannot offer sorting, like his confirmedEmail property.



@Entity
@Table(name = "user_account")
@SequenceGenerator(name = "id_generator", sequenceName = "user_account_id_seq", allocationSize = 10)
public class User extends AbstractEntity {

@Column(nullable = false)
private String firstname;
@Column(nullable = false)
private String lastname;
@Column(nullable = false, unique = true)
private EmailAddress email;
@Column(nullable = false)
private boolean confirmedEmail;

}


How can I prevent the Pageable argument from sorting on this boolean confirmedEmail property ?



I stumbled upon this issue when I sorted by clicking on the Confirmed header in my Angular data table.



This front-end event triggered the following request:



SELECT u FROM com.thalasoft.user.data.jpa.domain.User u order by u.confirmed asc


I know I can make this data table column not sortable, and I did. But I'd like to also have a server side safety in place.



As a side note, I wonder if I could also provide a default sorting if none is specified in the client request.



UPDATE: I created the utility method:



  public static final Sort stripColumnsFromSorting(Sort sort, Set<String> nonSortableColumns) {
return Sort.by(sort.stream().filter(order -> {
return !nonSortableColumns.contains(order.getProperty());
}).collect(Collectors.toList()));
}


which I call like:



Set<String> nonSortableColumns = new HashSet<String>(Arrays.asList("id", "confirmedEmail"));

public ResponseEntity<PagedResources<UserResource>> all(@PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) Pageable pageable, Sort sort,
PagedResourcesAssembler<User> pagedResourcesAssembler, UriComponentsBuilder builder) {
sort = CommonUtils.stripColumnsFromSorting(sort, nonSortableColumns);
userService.addSortToPageable(pageable, sort);


But it is still invoking the sorting on the non sortable column:



Invoking 'com.thalasoft.user.rest.controller.UserController.all' with arguments [Page request [number: 0, size 5, sort: confirmedEmail: DESC], confirmedEmail: DESC, org.springframework.data.web.MethodParameterAwarePagedResourcesAssembler@78817e7e, org.springframework.web.servlet.support.ServletUriComponentsBuilder@3e49647a]









share|improve this question





























    1















    My repository allows for sorting on any column when retrieving a list of users:



    public interface UserRepository extends JpaRepository<User, Long>, UserRepositoryCustom {

    @Query("SELECT u FROM User u")
    public Page<User> all(Pageable page);

    }


    The trouble is that a user has some properties that cannot offer sorting, like his confirmedEmail property.



    @Entity
    @Table(name = "user_account")
    @SequenceGenerator(name = "id_generator", sequenceName = "user_account_id_seq", allocationSize = 10)
    public class User extends AbstractEntity {

    @Column(nullable = false)
    private String firstname;
    @Column(nullable = false)
    private String lastname;
    @Column(nullable = false, unique = true)
    private EmailAddress email;
    @Column(nullable = false)
    private boolean confirmedEmail;

    }


    How can I prevent the Pageable argument from sorting on this boolean confirmedEmail property ?



    I stumbled upon this issue when I sorted by clicking on the Confirmed header in my Angular data table.



    This front-end event triggered the following request:



    SELECT u FROM com.thalasoft.user.data.jpa.domain.User u order by u.confirmed asc


    I know I can make this data table column not sortable, and I did. But I'd like to also have a server side safety in place.



    As a side note, I wonder if I could also provide a default sorting if none is specified in the client request.



    UPDATE: I created the utility method:



      public static final Sort stripColumnsFromSorting(Sort sort, Set<String> nonSortableColumns) {
    return Sort.by(sort.stream().filter(order -> {
    return !nonSortableColumns.contains(order.getProperty());
    }).collect(Collectors.toList()));
    }


    which I call like:



    Set<String> nonSortableColumns = new HashSet<String>(Arrays.asList("id", "confirmedEmail"));

    public ResponseEntity<PagedResources<UserResource>> all(@PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) Pageable pageable, Sort sort,
    PagedResourcesAssembler<User> pagedResourcesAssembler, UriComponentsBuilder builder) {
    sort = CommonUtils.stripColumnsFromSorting(sort, nonSortableColumns);
    userService.addSortToPageable(pageable, sort);


    But it is still invoking the sorting on the non sortable column:



    Invoking 'com.thalasoft.user.rest.controller.UserController.all' with arguments [Page request [number: 0, size 5, sort: confirmedEmail: DESC], confirmedEmail: DESC, org.springframework.data.web.MethodParameterAwarePagedResourcesAssembler@78817e7e, org.springframework.web.servlet.support.ServletUriComponentsBuilder@3e49647a]









    share|improve this question



























      1












      1








      1








      My repository allows for sorting on any column when retrieving a list of users:



      public interface UserRepository extends JpaRepository<User, Long>, UserRepositoryCustom {

      @Query("SELECT u FROM User u")
      public Page<User> all(Pageable page);

      }


      The trouble is that a user has some properties that cannot offer sorting, like his confirmedEmail property.



      @Entity
      @Table(name = "user_account")
      @SequenceGenerator(name = "id_generator", sequenceName = "user_account_id_seq", allocationSize = 10)
      public class User extends AbstractEntity {

      @Column(nullable = false)
      private String firstname;
      @Column(nullable = false)
      private String lastname;
      @Column(nullable = false, unique = true)
      private EmailAddress email;
      @Column(nullable = false)
      private boolean confirmedEmail;

      }


      How can I prevent the Pageable argument from sorting on this boolean confirmedEmail property ?



      I stumbled upon this issue when I sorted by clicking on the Confirmed header in my Angular data table.



      This front-end event triggered the following request:



      SELECT u FROM com.thalasoft.user.data.jpa.domain.User u order by u.confirmed asc


      I know I can make this data table column not sortable, and I did. But I'd like to also have a server side safety in place.



      As a side note, I wonder if I could also provide a default sorting if none is specified in the client request.



      UPDATE: I created the utility method:



        public static final Sort stripColumnsFromSorting(Sort sort, Set<String> nonSortableColumns) {
      return Sort.by(sort.stream().filter(order -> {
      return !nonSortableColumns.contains(order.getProperty());
      }).collect(Collectors.toList()));
      }


      which I call like:



      Set<String> nonSortableColumns = new HashSet<String>(Arrays.asList("id", "confirmedEmail"));

      public ResponseEntity<PagedResources<UserResource>> all(@PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) Pageable pageable, Sort sort,
      PagedResourcesAssembler<User> pagedResourcesAssembler, UriComponentsBuilder builder) {
      sort = CommonUtils.stripColumnsFromSorting(sort, nonSortableColumns);
      userService.addSortToPageable(pageable, sort);


      But it is still invoking the sorting on the non sortable column:



      Invoking 'com.thalasoft.user.rest.controller.UserController.all' with arguments [Page request [number: 0, size 5, sort: confirmedEmail: DESC], confirmedEmail: DESC, org.springframework.data.web.MethodParameterAwarePagedResourcesAssembler@78817e7e, org.springframework.web.servlet.support.ServletUriComponentsBuilder@3e49647a]









      share|improve this question
















      My repository allows for sorting on any column when retrieving a list of users:



      public interface UserRepository extends JpaRepository<User, Long>, UserRepositoryCustom {

      @Query("SELECT u FROM User u")
      public Page<User> all(Pageable page);

      }


      The trouble is that a user has some properties that cannot offer sorting, like his confirmedEmail property.



      @Entity
      @Table(name = "user_account")
      @SequenceGenerator(name = "id_generator", sequenceName = "user_account_id_seq", allocationSize = 10)
      public class User extends AbstractEntity {

      @Column(nullable = false)
      private String firstname;
      @Column(nullable = false)
      private String lastname;
      @Column(nullable = false, unique = true)
      private EmailAddress email;
      @Column(nullable = false)
      private boolean confirmedEmail;

      }


      How can I prevent the Pageable argument from sorting on this boolean confirmedEmail property ?



      I stumbled upon this issue when I sorted by clicking on the Confirmed header in my Angular data table.



      This front-end event triggered the following request:



      SELECT u FROM com.thalasoft.user.data.jpa.domain.User u order by u.confirmed asc


      I know I can make this data table column not sortable, and I did. But I'd like to also have a server side safety in place.



      As a side note, I wonder if I could also provide a default sorting if none is specified in the client request.



      UPDATE: I created the utility method:



        public static final Sort stripColumnsFromSorting(Sort sort, Set<String> nonSortableColumns) {
      return Sort.by(sort.stream().filter(order -> {
      return !nonSortableColumns.contains(order.getProperty());
      }).collect(Collectors.toList()));
      }


      which I call like:



      Set<String> nonSortableColumns = new HashSet<String>(Arrays.asList("id", "confirmedEmail"));

      public ResponseEntity<PagedResources<UserResource>> all(@PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) Pageable pageable, Sort sort,
      PagedResourcesAssembler<User> pagedResourcesAssembler, UriComponentsBuilder builder) {
      sort = CommonUtils.stripColumnsFromSorting(sort, nonSortableColumns);
      userService.addSortToPageable(pageable, sort);


      But it is still invoking the sorting on the non sortable column:



      Invoking 'com.thalasoft.user.rest.controller.UserController.all' with arguments [Page request [number: 0, size 5, sort: confirmedEmail: DESC], confirmedEmail: DESC, org.springframework.data.web.MethodParameterAwarePagedResourcesAssembler@78817e7e, org.springframework.web.servlet.support.ServletUriComponentsBuilder@3e49647a]






      spring-data-jpa spring-data






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 26 '18 at 18:18







      Stephane

















      asked Nov 24 '18 at 11:03









      StephaneStephane

      2,461114981




      2,461114981
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I think you can check Pageable argument of your controller method and then remove from it unnecessary fields, something like this:



          public ResponseEntity<?> myControllerMethod(..., Pageable page) {

          Sort newSort = Sort.by(page.getSort()
          .get()
          .filter(order -> !order.getProperty().equals("confirmedEmail"))
          .collect(Collectors.toList()));

          PageRequest newPage = PageRequest.of(page.getPageNumber(), page.getPageSize(), newSort);

          // using newPage instead of page...
          }


          To specify a default order you can use @PageableDefault annotation, for example:



          public ResponseEntity<?> myControllerMethod(..., @PageableDefault(sort = "lastname", direction = ASC) Pageable page) {
          //...
          }





          share|improve this answer


























          • I added this for the default sorting @PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) and it works nicely.

            – Stephane
            Nov 26 '18 at 13:48











          • Regarding stripping some unsortable columns from the pageable argument, I have an error with the get() method being unavailable for the type org.springframework.data.domain.Sort;. Instead of the .equals("confirmedEmail") I would like to have an array of strings. So I'm trying this method: public static final Sort stripColumnsFromSorting(Pageable pageable) { return Sort.by(pageable.getSort() .get() .filter(order -> !order.getProperty().equals("confirmedEmail")) .collect(Collectors.toList())); }

            – Stephane
            Nov 26 '18 at 13:57











          • This method public static final Sort stripColumnsFromSorting(Pageable pageable, Set<String> nonSortableColumns) { return Sort.by(pageable.getSort().stream().filter(order -> { return !nonSortableColumns.contains(order.getProperty()); }).collect(Collectors.toList())); } compiles.

            – Stephane
            Nov 26 '18 at 14:22






          • 1





            @Stephane please remove your additions from my answer and add them to your own answer. Those additions are not mine...

            – Cepr0
            Nov 26 '18 at 18:08











          • My mistake ! I corrected that. Lucky you saw it !

            – Stephane
            Nov 26 '18 at 18:18











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457465%2fhow-to-prevent-sorting-on-a-given-column%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I think you can check Pageable argument of your controller method and then remove from it unnecessary fields, something like this:



          public ResponseEntity<?> myControllerMethod(..., Pageable page) {

          Sort newSort = Sort.by(page.getSort()
          .get()
          .filter(order -> !order.getProperty().equals("confirmedEmail"))
          .collect(Collectors.toList()));

          PageRequest newPage = PageRequest.of(page.getPageNumber(), page.getPageSize(), newSort);

          // using newPage instead of page...
          }


          To specify a default order you can use @PageableDefault annotation, for example:



          public ResponseEntity<?> myControllerMethod(..., @PageableDefault(sort = "lastname", direction = ASC) Pageable page) {
          //...
          }





          share|improve this answer


























          • I added this for the default sorting @PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) and it works nicely.

            – Stephane
            Nov 26 '18 at 13:48











          • Regarding stripping some unsortable columns from the pageable argument, I have an error with the get() method being unavailable for the type org.springframework.data.domain.Sort;. Instead of the .equals("confirmedEmail") I would like to have an array of strings. So I'm trying this method: public static final Sort stripColumnsFromSorting(Pageable pageable) { return Sort.by(pageable.getSort() .get() .filter(order -> !order.getProperty().equals("confirmedEmail")) .collect(Collectors.toList())); }

            – Stephane
            Nov 26 '18 at 13:57











          • This method public static final Sort stripColumnsFromSorting(Pageable pageable, Set<String> nonSortableColumns) { return Sort.by(pageable.getSort().stream().filter(order -> { return !nonSortableColumns.contains(order.getProperty()); }).collect(Collectors.toList())); } compiles.

            – Stephane
            Nov 26 '18 at 14:22






          • 1





            @Stephane please remove your additions from my answer and add them to your own answer. Those additions are not mine...

            – Cepr0
            Nov 26 '18 at 18:08











          • My mistake ! I corrected that. Lucky you saw it !

            – Stephane
            Nov 26 '18 at 18:18
















          0














          I think you can check Pageable argument of your controller method and then remove from it unnecessary fields, something like this:



          public ResponseEntity<?> myControllerMethod(..., Pageable page) {

          Sort newSort = Sort.by(page.getSort()
          .get()
          .filter(order -> !order.getProperty().equals("confirmedEmail"))
          .collect(Collectors.toList()));

          PageRequest newPage = PageRequest.of(page.getPageNumber(), page.getPageSize(), newSort);

          // using newPage instead of page...
          }


          To specify a default order you can use @PageableDefault annotation, for example:



          public ResponseEntity<?> myControllerMethod(..., @PageableDefault(sort = "lastname", direction = ASC) Pageable page) {
          //...
          }





          share|improve this answer


























          • I added this for the default sorting @PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) and it works nicely.

            – Stephane
            Nov 26 '18 at 13:48











          • Regarding stripping some unsortable columns from the pageable argument, I have an error with the get() method being unavailable for the type org.springframework.data.domain.Sort;. Instead of the .equals("confirmedEmail") I would like to have an array of strings. So I'm trying this method: public static final Sort stripColumnsFromSorting(Pageable pageable) { return Sort.by(pageable.getSort() .get() .filter(order -> !order.getProperty().equals("confirmedEmail")) .collect(Collectors.toList())); }

            – Stephane
            Nov 26 '18 at 13:57











          • This method public static final Sort stripColumnsFromSorting(Pageable pageable, Set<String> nonSortableColumns) { return Sort.by(pageable.getSort().stream().filter(order -> { return !nonSortableColumns.contains(order.getProperty()); }).collect(Collectors.toList())); } compiles.

            – Stephane
            Nov 26 '18 at 14:22






          • 1





            @Stephane please remove your additions from my answer and add them to your own answer. Those additions are not mine...

            – Cepr0
            Nov 26 '18 at 18:08











          • My mistake ! I corrected that. Lucky you saw it !

            – Stephane
            Nov 26 '18 at 18:18














          0












          0








          0







          I think you can check Pageable argument of your controller method and then remove from it unnecessary fields, something like this:



          public ResponseEntity<?> myControllerMethod(..., Pageable page) {

          Sort newSort = Sort.by(page.getSort()
          .get()
          .filter(order -> !order.getProperty().equals("confirmedEmail"))
          .collect(Collectors.toList()));

          PageRequest newPage = PageRequest.of(page.getPageNumber(), page.getPageSize(), newSort);

          // using newPage instead of page...
          }


          To specify a default order you can use @PageableDefault annotation, for example:



          public ResponseEntity<?> myControllerMethod(..., @PageableDefault(sort = "lastname", direction = ASC) Pageable page) {
          //...
          }





          share|improve this answer















          I think you can check Pageable argument of your controller method and then remove from it unnecessary fields, something like this:



          public ResponseEntity<?> myControllerMethod(..., Pageable page) {

          Sort newSort = Sort.by(page.getSort()
          .get()
          .filter(order -> !order.getProperty().equals("confirmedEmail"))
          .collect(Collectors.toList()));

          PageRequest newPage = PageRequest.of(page.getPageNumber(), page.getPageSize(), newSort);

          // using newPage instead of page...
          }


          To specify a default order you can use @PageableDefault annotation, for example:



          public ResponseEntity<?> myControllerMethod(..., @PageableDefault(sort = "lastname", direction = ASC) Pageable page) {
          //...
          }






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 26 '18 at 18:17









          Stephane

          2,461114981




          2,461114981










          answered Nov 26 '18 at 10:37









          Cepr0Cepr0

          9,40721647




          9,40721647













          • I added this for the default sorting @PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) and it works nicely.

            – Stephane
            Nov 26 '18 at 13:48











          • Regarding stripping some unsortable columns from the pageable argument, I have an error with the get() method being unavailable for the type org.springframework.data.domain.Sort;. Instead of the .equals("confirmedEmail") I would like to have an array of strings. So I'm trying this method: public static final Sort stripColumnsFromSorting(Pageable pageable) { return Sort.by(pageable.getSort() .get() .filter(order -> !order.getProperty().equals("confirmedEmail")) .collect(Collectors.toList())); }

            – Stephane
            Nov 26 '18 at 13:57











          • This method public static final Sort stripColumnsFromSorting(Pageable pageable, Set<String> nonSortableColumns) { return Sort.by(pageable.getSort().stream().filter(order -> { return !nonSortableColumns.contains(order.getProperty()); }).collect(Collectors.toList())); } compiles.

            – Stephane
            Nov 26 '18 at 14:22






          • 1





            @Stephane please remove your additions from my answer and add them to your own answer. Those additions are not mine...

            – Cepr0
            Nov 26 '18 at 18:08











          • My mistake ! I corrected that. Lucky you saw it !

            – Stephane
            Nov 26 '18 at 18:18



















          • I added this for the default sorting @PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) and it works nicely.

            – Stephane
            Nov 26 '18 at 13:48











          • Regarding stripping some unsortable columns from the pageable argument, I have an error with the get() method being unavailable for the type org.springframework.data.domain.Sort;. Instead of the .equals("confirmedEmail") I would like to have an array of strings. So I'm trying this method: public static final Sort stripColumnsFromSorting(Pageable pageable) { return Sort.by(pageable.getSort() .get() .filter(order -> !order.getProperty().equals("confirmedEmail")) .collect(Collectors.toList())); }

            – Stephane
            Nov 26 '18 at 13:57











          • This method public static final Sort stripColumnsFromSorting(Pageable pageable, Set<String> nonSortableColumns) { return Sort.by(pageable.getSort().stream().filter(order -> { return !nonSortableColumns.contains(order.getProperty()); }).collect(Collectors.toList())); } compiles.

            – Stephane
            Nov 26 '18 at 14:22






          • 1





            @Stephane please remove your additions from my answer and add them to your own answer. Those additions are not mine...

            – Cepr0
            Nov 26 '18 at 18:08











          • My mistake ! I corrected that. Lucky you saw it !

            – Stephane
            Nov 26 '18 at 18:18

















          I added this for the default sorting @PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) and it works nicely.

          – Stephane
          Nov 26 '18 at 13:48





          I added this for the default sorting @PageableDefault(sort = { "lastname", "firstname" }, direction = Sort.Direction.ASC) and it works nicely.

          – Stephane
          Nov 26 '18 at 13:48













          Regarding stripping some unsortable columns from the pageable argument, I have an error with the get() method being unavailable for the type org.springframework.data.domain.Sort;. Instead of the .equals("confirmedEmail") I would like to have an array of strings. So I'm trying this method: public static final Sort stripColumnsFromSorting(Pageable pageable) { return Sort.by(pageable.getSort() .get() .filter(order -> !order.getProperty().equals("confirmedEmail")) .collect(Collectors.toList())); }

          – Stephane
          Nov 26 '18 at 13:57





          Regarding stripping some unsortable columns from the pageable argument, I have an error with the get() method being unavailable for the type org.springframework.data.domain.Sort;. Instead of the .equals("confirmedEmail") I would like to have an array of strings. So I'm trying this method: public static final Sort stripColumnsFromSorting(Pageable pageable) { return Sort.by(pageable.getSort() .get() .filter(order -> !order.getProperty().equals("confirmedEmail")) .collect(Collectors.toList())); }

          – Stephane
          Nov 26 '18 at 13:57













          This method public static final Sort stripColumnsFromSorting(Pageable pageable, Set<String> nonSortableColumns) { return Sort.by(pageable.getSort().stream().filter(order -> { return !nonSortableColumns.contains(order.getProperty()); }).collect(Collectors.toList())); } compiles.

          – Stephane
          Nov 26 '18 at 14:22





          This method public static final Sort stripColumnsFromSorting(Pageable pageable, Set<String> nonSortableColumns) { return Sort.by(pageable.getSort().stream().filter(order -> { return !nonSortableColumns.contains(order.getProperty()); }).collect(Collectors.toList())); } compiles.

          – Stephane
          Nov 26 '18 at 14:22




          1




          1





          @Stephane please remove your additions from my answer and add them to your own answer. Those additions are not mine...

          – Cepr0
          Nov 26 '18 at 18:08





          @Stephane please remove your additions from my answer and add them to your own answer. Those additions are not mine...

          – Cepr0
          Nov 26 '18 at 18:08













          My mistake ! I corrected that. Lucky you saw it !

          – Stephane
          Nov 26 '18 at 18:18





          My mistake ! I corrected that. Lucky you saw it !

          – Stephane
          Nov 26 '18 at 18:18




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457465%2fhow-to-prevent-sorting-on-a-given-column%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'