cost 275 ms
将 EntityGraphJpaSpecificationExecutor 添加到存储库后找不到类型的属性 - No property found for type after adding EntityGraphJpaSpecificationExecutor to repository

我有一个与另一个实体有关系的实体: 我有一个完美运行的存储库: 但是当我在我的存储库中扩展 EntityGraphJpaSpecificationExecutor 时,它似乎无法识别没有实体图的以前的存储库方法,即使存储库仍在实现 findById 方法。 我得到以下异常: 我的 pom ...

Spring Data JPA:使用 @EntityGraph 和 EntityGraphType.LOAD 不会加入 EAGER @OneToOne 关系 - Spring Data JPA: Using @EntityGraph with EntityGraphType.LOAD doesn't join EAGER @OneToOne Relation

我有以下实体关系(在 Kotlin 中): 发票实体: 联系实体: 会计联系实体: 当我执行查询方法时 那么我希望查询包含 Contact-Entity 和 AccountingContactEntity 的JOIN 。 但是AccountingContactEntity 缺少它 ...

为什么使用@NamedEntityGraph 抛出异常? - Why using @NamedEntityGraph throw exception?

我有Spring Boot应用程序。 在应用程序中存在实体: 特点是Paragraph实体与其他段落具有反身的 OneToMany 关系。 我制作了 JpaRepository 以便获得该段落的子段落: 但是如果我在这个方法中使用@EntityGraph ,调用这个方法会抛出异常,否则方法工作正常 ...

延迟获取具有多个关系的实体:无法写入 JSON:未能延迟初始化角色集合 - Lazily fetching entity with multiple relations: Could not write JSON: failed to lazily initialize a collection of role

我有以下实体:Toy、Cat、CatFood 和 Food。 基本上,猫与玩具的关系是 1:1,而猫和食物是使用 CatFood 的 m:n 关系。@NamedEntityGraphs({ @NamedEntityGraph(name = "toyWithCat", ...

@EntityGraph 注释不能正常工作? - @EntityGraph annotation doesn't work properly?

我需要通过遵循不同的 EntityGraphs 注释来为同一个findAll()方法实现两个不同的实现。 通过引用另一个 StackOverflow 帖子,我找到了一种使用不同 EntityGrpahs 实现相同findAll()方法的方法。 但是,当我使用该帖子中提到的默认方法时,我没有得到预期 ...

子图可以引用另一个命名实体图吗? - Can subgraph reference another named entity graph?

所以我找到了一些答案,其中一个说可以这样做,另一个说不可以。 这让我感到困惑,因为当我尝试这样做时——我失败了。 我想要的是在这样的子图中引用命名实体图: 我想使用 Spring 数据存储库方法: 但是当我想像parent.child.grandChildren一样引用grandChildren时 ...

我可以使用 hibernate 字符串 entityGraph 和使用 org.springframework.data.jpa.repository.EntityGraph 的子图吗 - Can i use hibernate string entityGraph with subgraphs useing org.springframework.data.jpa.repository.EntityGraph

我需要指定要使用 spring 数据 org.springframework.data.jpa.repository.EntityGraph 注释的根实体的关系实体的获取行为,为此在上述方法的存储库中指定图形权。 但是当我写 我收到错误,无法在此 ManagedType 上找到具有给定名称 [ord ...

使用@NamedEntityGraphs 注解时如何避免“代码异味”? - How to avoid “code smell” when using @NamedEntityGraphs annotation?

在 IntellyJ Idea 中,我安装了 SonarLint。 代码分析器说我必须从此注释组中删除“NamedEntityGraphs”包装器。 这是我的代码: 这是来自 SonarLint 的 arguments: 注释重复不应被包裹代码气味,轻微,java:S1710 在 Java 8 之 ...

Spring Data JPA + 字节码增强 - Spring Data JPA + Bytecode Enhancement

是否可以使用 JPA 接口(实体图)急切地加载 @*ToOne 属性,这些属性在父实体类中使用 @LazyToOne 和 @LazyGroup 设置为惰性并启用字节码增强? 我正在尝试使用实体图急切地加载此类属性,但是当查询父实体时,它正在为此类 @*ToOne 属性触发另一个查询。 尝试使用另一 ...

Spring 数据 JPA - 使用 @EntityGraph 导致“指定的实体图不适用于实体”警告 - Spring data JPA - using @EntityGraph causes “Entity graph specified is not applicable to the entity” warning

我将我的应用程序从 spring 启动 2.2.5 升级到 2.3.3,并且我正在使用 spring 数据 Z9CE3D1BD8890F16A0C448093595420 板载启动器。 我的实体在编译时得到了增强。 现在,当我在JpaRepository中的覆盖findAll方法上使用带有attri ...

Spring 数据 JPA findAll 与不同的EntityGraph - Spring Data JPA findAll with different EntityGraph

在 Spring 数据 JPA 存储库中,我需要指定多个执行相同操作的方法(例如 findAll),但指定不同的 @EntityGraph 注释(目标是优化用于不同服务的方法)。 埃斯。 在 Java 中我们不能多次使用相同的方法签名,那么如何管理呢? 不使用JPQL可以吗? 谢谢, 加布里埃尔 ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM