spring-data-jpa

    3热度

    1回答

    我想拥有一个具有两列的特定表,一个ID和一个字段,我将在其中存储一个JSON对象。我正在使用Spring Data JPA。 我想在这条线的东西,但我不知道: @Entity @Table(name = "some_table") public class SomeTable { @Id @Column(name = "id", unique = true) @

    1热度

    2回答

    我需要分页来显示来自一个数据库表的过滤数据。例如,我有一个CARS表,我只需要分页... WHERE CAR = "BMW"。到目前为止,我使用JPA repository.findAll(Pageable pageable)方法,如果我只从一个表中分页数据。 是否有任何标准的方式来实现这个使用标准的存储库方法,还是我必须编写自己的实现?谢谢。

    1热度

    2回答

    我跟着创建和自定义库的参考指南,并与下面上来: public class MyBasicRepositoryFactoryBean<R extends JpaRepository<T, I>, T extends BaseEntity, I extends Serializable> extends JpaRepositoryFactoryBean<R, T, I> { @O

    0热度

    1回答

    我有很奇怪的问题。在我的存储库中,我需要扩展JpaSpecificationExecutor<T>接口,以便能够使用findAll(Specification<T>, Pageable)进行自定义查询分页。 但是,当我使用JpaSpecificationExecutor, public interface DescriptionRepository extends ParentRepository

    0热度

    1回答

    我有以下使用存储库和活动记录的Spring MVC控制器。我系统地得到以下异常: Caused by: javax.persistence.EntityNotFoundException: Unable to find trc.suivi.domain.Destinataire with id 892 at org.hibernate.ejb.Ejb3Configuration$Ejb3

    2热度

    3回答

    我使用Spring数据JPA和我想这里描述的自定义行为添加到所有存储库: http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/#repositories.custom-behaviour-for-all-repositories 我遇到的几个问题: - 首先,有在作为Spring文档中所描述

    23热度

    1回答

    在阅读Spring Data文档时,我多次遇到了@NoRepositoryBean接口。 要从文件引用: 如果您使用自动仓库接口检测使用 春天命名空间使用,就像是会造成弹簧 努力创造MyRepository实例的接口。这当然不是 所需的,因为它只是作为知识库和要为每个实体定义的实际存储库接口之间的中介。至 排除扩展知识库的界面被实例化为 存储库实例使用@NoRepositoryBean注释它。 但

    2热度

    1回答

    我在参考下面的Spring文档:http://static.springsource.org/spring-data/data-jpa/docs/1.1.0.RELEASE/reference/html/#repositories.custom-behaviour-for-all-repositories 我试图如上所述了解背后JPA定制库的逻辑。 我的猜测是,我要创建一个UserReposito

    10热度

    1回答

    我定义我的ContactDAO如下: public interface ContactDao extends JpaRepository<Contact, Long> { /** * Finds all contacts that the given user has entered where the contact's full name matches {@code n

    9热度

    4回答

    我正在尝试使用eclipselink(2.4.0)和spring-data-jpa(1.1.0.RELEASE)的组合来实现解决方案。但是,每次我部署解决方案(Tomcat的7)时,我得到以下异常: Caused by: java.lang.IllegalArgumentException: No [ManagedType] was found for the key class [com.ac