Part 2 - Get List of Students in a Department OneToMany Relationship

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 19

  • @stivkapten5371
    @stivkapten5371 5 лет назад +1

    Thanks a ton mate! I've been watching your general spring and thymeleaf course aswell and these two together have really helped me to solve my issues. Straight to the point and nice tempo.

  • @mostinho7
    @mostinho7 4 года назад +2

    Done thanks
    Student department is many to one (many students in one department)
    The API filters by department ID
    /departments/Id/students
    Repository is a Department crudrepository, not a Student crud repository. That’s why the query selects from Department. We could have also selected from student where department id.

  • @sudarshanrbhat7686
    @sudarshanrbhat7686 3 года назад

    i go so involved at 8:00 i was yelling that you missed a 't' XD LOL!..., Sir, thank you for the awesome tutorial

  • @user-44-55
    @user-44-55 2 года назад +1

    no conditions in service ? return directly ? what if student dont exist
    and when adding departement or studen what if already exist

  • @itzmeash1
    @itzmeash1 2 года назад +1

    Hi , i followed the same as you showed in part 1 , but i get null in my foriegn key column in the child table, can you advise if possible , thanks

    • @devadharshinim6349
      @devadharshinim6349 2 года назад

      same issue.. did you solve it?

    • @itzmeash1
      @itzmeash1 2 года назад

      @@devadharshinim6349 no, haven't found a solution yet, if you do please mention here.

    • @devadharshinim6349
      @devadharshinim6349 2 года назад

      @@itzmeash1 yes, my constructor was missing. After i got that, it got solved..
      I'm getting like one column(primary key column) from department table linked with student table. But in department table, I'm not getting any students details.

    • @devadharshinim6349
      @devadharshinim6349 2 года назад +1

      @@itzmeash1 Also you have to create the department details first to add the students' details. If you don't add it, department will be shown as null.

    • @itzmeash1
      @itzmeash1 2 года назад +1

      Thanks , I haven't been doing the same solution in the video ,but a more similar case on my own application, I will check if this constructor was missed there.
      Happy learning! Best wishes.

  • @eduardoignacioroblessosa6349
    @eduardoignacioroblessosa6349 2 года назад

    ty brother

  • @aymenmoussawi2852
    @aymenmoussawi2852 2 года назад

    That page can’t be found.

  • @ahamedfarook5866
    @ahamedfarook5866 2 года назад

    Student to department many to one,
    Student to batch many to one batch means year of student, department to batch many to many relationship, so I call department of MCA batch of 2nd year I want student list how to i mapping

  • @mostinho7
    @mostinho7 4 года назад

    Done thanks
    Student department is many to one (many students in one department)
    The API filters by department ID one side
    /departments/Id/students
    Repository is a Department crudrepository, not a Student crud repository. That’s why the query selects from Department. We could have also selected from student where department id.