我想让events.html模板以某种方式格式化字符串,但我不知道该怎么做。下面是我认为它应该如何工作的方式,但事实并非如此。
events.html
{% extends "base.html" %}
{% block content %}
{% for object in objects %}
<h1>{{object.name}}</h1>
<p>When: {{ "It will take place in the year %s and the month %s" % (object.when.year, objec
有人能帮我解决这个问题吗?我尝试使用mapstruct,它工作得很好,但只适用于没有双向关系的实体。
例如,我有以下实体:
@Entity
public class Pacients implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int pacientId;
// bi-directional many-to-one association to Doctori
@ManyToOne(fetch = FetchType.LAZ