File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/main/kotlin/com/example/web/jdbc/web/jdbc Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ import org.springframework.data.relational.core.mapping.Table
99data class Subject (@Id val subjectId : Int , var subjectDesc : String , var subjectName : String )
1010
1111@Table(" branch_subject" )
12- data class SubjectRef (val subjectId : Long )
12+ data class SubjectRef (val subjectId : Int )
1313
1414data class Branch (
15- @Id val branchId : Long ,
15+ @Id val branchId : Int ,
1616 var branchName : String ,
1717 @Column(" branch_short_name" ) var branchShortName : String ,
1818 var description : String? = null ,
@@ -22,7 +22,7 @@ data class Branch(
2222) {
2323
2424 fun addSubject (subject : Subject ) {
25- subjects.add(SubjectRef (subject.subjectId.toLong() ))
25+ subjects.add(SubjectRef (subject.subjectId))
2626 }
2727}
2828
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ import org.springframework.stereotype.Repository
77
88
99@Repository
10- interface SubjectRepository : CrudRepository <Subject , Long >
10+ interface SubjectRepository : CrudRepository <Subject , Int >
1111
1212@Repository
13- interface BranchRepository : CrudRepository <Branch , Long >
13+ interface BranchRepository : CrudRepository <Branch , Int >
1414
1515@Repository
1616interface PersonRepository : CrudRepository <Person , Long > {
You can’t perform that action at this time.
0 commit comments