``package mk.ukim.finki.npb_proekt_be.model;
import jakarta.persistence.*;
import lombok.Data;
import org.hibernate.annotations.Immutable;
import org.hibernate.annotations.Subselect;
import java.io.Serializable;
@Entity
@Data
@Immutable
@Table(name = "job_ads", schema = "public")
@Subselect("select * from public.job_ads")
public class JobAds implements Serializable {
@Id
@GeneratedValue(generator = "hibernate-uuid", strategy = GenerationType.IDENTITY)
private String id;
private Integer jobad_id;
private String jobdescription;
private Integer worklocationid;
private String worklocation;
private Integer placeid;
private String placename;
}
`
`
This is my class which is mapped from a view that contains all fields except id, because it's view it doesn't have id. Here is the schema . shema from database.
So i am trying to get data from this view but it keeps getting some error like in the title please help.
Also the repository is this
package mk.ukim.finki.npb_proekt_be.repository;
import jakarta.transaction.Transactional;
import mk.ukim.finki.npb_proekt_be.model.JobAds;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
@Transactional
public interface JobAdsRepo extends JpaRepository<JobAds, String> {
}
I am trying to get view data and show it on the frontend. The view also has a lot of rows so i am expecting some list with 100 rows.