I am working with spring and my entity is
myEntity.java
@Entity
public class Ecran {
...
@OneToMany(fetch=FetchType.EAGER, cascade = { CascadeType.ALL } , mappedBy="ecran")
public Set<Fields> fields = new HashSet<>();
...
}
Run Code Online (Sandbox Code Playgroud)
and i am trying to change a property of fields like that
myPage.html
<div th:each="field, itemStat : *{fields}" >
<div class="row table-responsive-xl mt-3" >
<label class="font-weight-medium h5 black-text" th:text="${field.nom}" for="${field.idJira}"></label>
<input type="text" id="${field.id}" class="form-control mb-6" th:field="*{fields[__${itemStat.index}__].value}">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
but it's showing me this error
2018-08-20 09:09:36.000 ERROR 13144 …
我有一个用户实体:
用户.java
@Entity
public class user {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@NotNull
@NotBlank
private String firstname;
...
Run Code Online (Sandbox Code Playgroud)
当我第一次部署应用程序时,它会在我的数据库中创建这个表。
我的问题:有没有办法在创建表user
时创建一个带有名字的管理员用户和表?
我的问题是:我尝试在android studio中导入Google Maps API示例。但是,当我在“导入项目”菜单中选择目录时,没有任何反应。没有错误,只有沉默。当我尝试导入任何Google示例或开源项目时,情况相同。我有Android Studio 2.1.2
更新:
无法保存'/home/antonid/Android_Projects/android-ActionBarCompat-ShareActionProvider/local.properties'/home/antonid/Android_Projects/android-ActionBarCompat-ShareActionProvider/local.properties(权限被拒绝)'
我使用了这个JPA:检查实体对象是否已被持久化, 以确定我是否持久化或合并我的实体,它将如下所示:
if (!getEntityManager().contains(entity)) {
System.out.println(" PERSIST ");
} else {
System.out.println(" MERGE ");
}
Run Code Online (Sandbox Code Playgroud)
案例是 - 即使我编辑我的实体 - 它也不会被识别为合并.
怎么可能以及如何使它工作?
java ×2
spring ×2
spring-boot ×2
android ×1
import ×1
jpa ×1
jpa-2.1 ×1
spring-mvc ×1
thymeleaf ×1