我在使用 hibernate 从 java 实体中的枚举更新 postgres 数据库中的枚举字段时遇到问题,导致标题中出现错误。
我的数据库看起来像这样
\dT fulfillment_status
List of data types
Schema | Name | Description
--------+--------------------+-------------
public | fulfillment_status |
(1 row)
Run Code Online (Sandbox Code Playgroud)
这设置特定列fulfillment_status的类型,即
Column | Type | Collation | Nullable | Default
----------------------------+--------------------------------+-----------+----------+--------------------------------------
fulfillment_status | fulfillment_status | | not null |
Run Code Online (Sandbox Code Playgroud)
java实体类的相关章节
@Entity
@Table(name = "payments", uniqueConstraints = { @UniqueConstraint(columnNames = {"id"})})
public class Payment {
private FulfillmentStatus fulfillmentStatus;
public enum FulfillmentStatus {
PENDING, FULFILLED, FAILED, ABORTED
}
@Enumerated(EnumType.STRING)
@Column(name = "fulfillment_status", nullable = false, columnDefinition …Run Code Online (Sandbox Code Playgroud) 虽然看起来很简单,但在尝试克隆具有子模块的 git 存储库时,我的 ansible 设置挂起。'父' 存储库克隆没有问题,但 ansible 任务无法克隆子模块,实际上在此之后挂起,几乎就好像它期待一些响应一样......
这是我克隆 repo 的 ansible 任务:
- name: Clone/Pull the {{ certificate_authority.repo.name }} repository
become: yes
git: repo="{{ ca.repo.url }}" force=yes accept_hostkey=yes clone=yes version="{{ git_branch | default(git_tag) }}"
dest="{{ ca.repo.dest }}" key_file={{ ca.repo.key.location }}/{{ ca.repo.key.name }} recursive=yes track_submodules=yes
Run Code Online (Sandbox Code Playgroud)
知道为什么 ansible 挂起克隆这个 repo 吗?