Skip to content

Commit

Permalink
Merge pull request #13 from UdL-EPS-SoftArch/crud-Location-Relationship
Browse files Browse the repository at this point in the history
Location Relationship
  • Loading branch information
elskater98 authored Mar 6, 2024
2 parents 250481f + 525aab0 commit 19bf1d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/cat/udl/eps/softarch/demo/domain/Location.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@Entity
@EqualsAndHashCode(callSuper = false)
public class Location {
@OneToOne
@NotNull
@JsonIdentityReference(alwaysAsId = true)
private Shelter shelter;

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package cat.udl.eps.softarch.demo.repository;

import cat.udl.eps.softarch.demo.domain.Location;
import cat.udl.eps.softarch.demo.domain.User;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface LocationRepository extends CrudRepository<Location, String>, PagingAndSortingRepository<Location, String> {


}

0 comments on commit 19bf1d0

Please sign in to comment.