cost 387 ms
JPA 分配大小导致自动生成的序列在 AllocationSize 后重用 - JPA allocation Size causing Auto Generated Sequence to Reused after AllocationSize

我有 Graph 的递归父子关系。 当我在单个 hibernate session 上有一个包含 50 个或更多节点的大型图时,我收到一条错误消息“具有相同标识符值的不同 object 已与会话相关联”。 这是因为 Spring JPA 中的默认分配大小为 50。我通过将 allocationSiz ...

如何在 lucene 查询中匹配数字和布尔值 - How to match numeric and boolean values in a lucene query

我正在使用休眠搜索来构造一个 lucene 查询,该查询返回包含(部分)搜索字符串的字符串值。 接下来,如果语言 id 也匹配并且删除标志未设置为 true,则查询必须仅返回字符串值。 我为此编写了以下代码。 但问题是它不返回任何东西。 获取匹配字符串条件 获取语​​言条件 创建语言谓词 ...

Hibernate 5 模式验证:缺少带有 HBM 文件的表 - Hibernate 5 Schema-validation: missing table with HBM files

这个问题与我之前遇到的问题非常相似。 我正在将现有的非 Spring 应用程序从 Hibernate 3.x 转换为最新的 5.6.0.Final(此时)。 我们在 AWS 中使用 MariaDB 并使用最新的 MariaDB 驱动程序。 我们目前还在为旧表使用 HBM xml 文件,直到我们离开它 ...

将休眠版本升级到 5.4 让我“没有正在进行的事务” - Upgrading hibernate version to 5.4 gives me 'no transaction is in progress'

我正在尝试升级 spring 版本(4.3)和 hibernate 版本(5.4)并且我得到“没有正在进行的事务”异常,我正在使用 HibernateTransactionManager 并且我尝试将 hibernate.transaction.coordinator_class 设置为 'jta' ...

升级到 Hibernate 5:既然 TypeResolver 已被弃用,如何获取类型映射 - Upgrading to Hibernate 5: how to get type mapping now that TypeResolver is deprecated

我正在使用一个较旧的代码库,它有很多实体使用这样的枚举(当前使用 Hibernate 3),带有“通用”GenericEnumUserType 类: GenericEnumUserType(想法是 valueOf 方法的 java 返回类型映射到适当的 sql 类型): 既然 TypeRe ...

Spring 事务管理中的“无法为当前线程获取事务同步的 Session”错误 - “Could not obtain transaction-synchronized Session for current thread” error in Spring transaction management

我正在将应用程序从 Spring 3.2 迁移到 Spring 5。该应用程序使用 AWS RDS,主数据库作为主数据源或主数据源,副本数据库作为只读数据源。 应用程序为主数据源创建一个 session 工厂 (primarySessionFacotry) 实例,为只读数据源创建另一个 (readO ...

Spring 启动 Hibernate 未获取 use-new-id-generator-mappings 属性 - Spring Boot Hibernate not picking up use-new-id-generator-mappings property

我正在将我的项目升级到使用 Hibernate 5.3.18 的 Spring Boot 2.1.18。 以前,我的实体看起来像这样,并且会使用 SequenceHiLoGenerator: 现在,默认情况下,在 Hibernate 5 中,它使用 SequenceStyleGenerator 导致 ...

SpringOrm-Hibernate 4 到 5 迁移问题 - 需要在构建 sessionFactory 之前改变元数据 - SpringOrm-Hibernate 4 to 5 migration issue - need to mutate metadata before building sessionFactory

我正在尝试使用 Spring-Orm 4.3.29 从 Hibernate 4.3.11 升级到 5.4.x。 作为升级的一部分,我需要迁移依赖于从 Hibernate 配置 class 检索的 NamedSQLQueries 的现有自定义逻辑。 在构建 sessionFactory 之前,此自定义 ...

Hibernate: getting error to run this SQL query “alter session enable parallel dml” in Hibernate 5.4.x version - Hibernate: getting error to run this SQL query “alter session enable parallel dml” in Hibernate 5.4.x version

我已在我的应用程序中将 Hibernate 4.x 版本升级到 Hibernate 5.4.x 版本。 在 SQL 查询下运行时出现以下错误: javax.persistence.TransactionRequiredException: Executing an update/delete q ...

java.lang.ClassCastException: [B 不能转换为 [Ljava.lang.Object; 使用 JPA 2.2 query.getResultStream().findFirst() - java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object; while using JPA 2.2 query.getResultStream().findFirst()

我的 Spring Data 存储库方法的代码如下: 如您所见,我正在尝试以字节数组的形式获取在 Postgres 架构中定义为bytea的shipmentLabel列。 运行时出现以下异常: java.lang.ClassCastException: [B 不能转换为 [Ljava.l ...


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