- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用列表对象执行 SQL JPA 查询,但是当我尝试时出现以下错误消息:
Cannot be resolved to a valid type.
我将 JPA 与 Maven 一起使用。我想这样做:
@Entity
@Table(name = "Personne")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Personne.findAll", query = "SELECT p FROM Personne p"),
@NamedQuery(name = "Personne.findByKeyClient", query = "SELECT p FROM Personne p WHERE p.keyClient = :keyClient"),
@NamedQuery(name = "Personne.CountPersonne", query = "SELECT COUNT(p) FROM Personne p WHERE p.sessionCollection.keySession = :keySession "),
@NamedQuery(name = "Personne.findByNom", query = "SELECT p FROM Personne p WHERE p.nom = :nom"),
@NamedQuery(name = "Personne.findByPrenom", query = "SELECT p FROM Personne p WHERE p.prenom = :prenom"),
@NamedQuery(name = "Personne.findByEmail", query = "SELECT p FROM Personne p WHERE p.email = :email"),
@NamedQuery(name = "Personne.findByTelephone", query = "SELECT p FROM Personne p WHERE p.telephone = :telephone"),
@NamedQuery(name = "Personne.findByPortable", query = "SELECT p FROM Personne p WHERE p.portable = :portable"),
@NamedQuery(name = "Personne.findByFax", query = "SELECT p FROM Personne p WHERE p.fax = :fax"),
@NamedQuery(name = "Personne.findByDateModification", query = "SELECT p FROM Personne p WHERE p.dateModification = :dateModification"),
@NamedQuery(name = "Personne.findByDateCreation", query = "SELECT p FROM Personne p WHERE p.dateCreation = :dateCreation"),
@NamedQuery(name = "Personne.findByActif", query = "SELECT p FROM Personne p WHERE p.actif = :actif")})
public class Personne implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@NotNull
@Column(name = "KeyClient")
private String keyClient;
@Size(max = 255)
@Column(name = "Nom")
private String nom;
@Size(max = 255)
@Column(name = "Prenom")
private String prenom;
// @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
@Size(max = 255)
@Column(name = "Email")
private String email;
@Size(max = 255)
@Column(name = "Telephone")
private String telephone;
@Size(max = 255)
@Column(name = "Portable")
private String portable;
@Size(max = 255)
@Column(name = "TypeInscription")
private String typeInscription;
// @Pattern(regexp="^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$", message="Invalid phone/fax format, should be as xxx-xxx-xxxx")//if the field contains phone or fax number consider using this annotation to enforce field validation
@Size(max = 255)
@Column(name = "Fax")
private String fax;
@Column(name = "DateModification")
@Temporal(TemporalType.DATE)
private Date dateModification;
@Column(name = "DateCreation")
@Temporal(TemporalType.DATE)
private Date dateCreation;
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "KeyTypeUser")
private TypeUser typeUser;
@Size(max = 1)
@Column(name = "actif")
private String actif;
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "KeyEntreprise")
private Entreprise entreprise;
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "KeyCivilite")
private Civilite civilite;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Login> loginCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<SourceInscription> sourceInscriptionCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<CorrespondanceImportation> CorrespondanceImportationCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Hotesse> hotesseCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Passage> passageCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Produit> produitCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Droit> droitCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<ReponseClient> reponseClientCollection;
@OneToMany(mappedBy = "utilisateurSource",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<SourceInscription> PersonneUtilisateurSourceCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<AutreInformation> autreInformationCollection;
@OneToMany(mappedBy = "personne",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<CrmLien> CrmLienCollection;
@ManyToMany(cascade = CascadeType.ALL)
private List<Session> sessionCollection;
public Personne() {
}
public Personne(String keyClient) {
this.keyClient = keyClient;
}
public String getKeyClient() {
return keyClient;
}
public void setKeyClient(String keyClient) {
this.keyClient = keyClient;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public String getPrenom() {
return prenom;
}
public void setPrenom(String prenom) {
this.prenom = prenom;
}
public String getTypeInscription() {
return typeInscription;
}
public void setTypeInscription(String typeInscription) {
this.typeInscription = typeInscription;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getPortable() {
return portable;
}
public void setPortable(String portable) {
this.portable = portable;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public Date getDateModification() {
return dateModification;
}
public void setDateModification(Date dateModification) {
this.dateModification = dateModification;
}
public Date getDateCreation() {
return dateCreation;
}
public void setDateCreation(Date dateCreation) {
this.dateCreation = dateCreation;
}
public String getActif() {
return actif;
}
public void setActif(String actif) {
this.actif = actif;
}
public TypeUser getTypeUser() {
return typeUser;
}
public void setTypeUser(TypeUser typeUser) {
this.typeUser = typeUser;
}
@XmlTransient
public List<Login> getLoginCollection() {
return loginCollection;
}
public void setLoginCollection(List<Login> loginCollection) {
this.loginCollection = loginCollection;
}
@XmlTransient
public List<CrmLien> getCrmLienCollection() {
return CrmLienCollection;
}
public void setCrmLienCollection(List<CrmLien> CrmLienCollection) {
this.CrmLienCollection = CrmLienCollection;
}
@XmlTransient
public List<SourceInscription> getSourceInscriptionCollection() {
return sourceInscriptionCollection;
}
public void setSourceInscriptionCollection(List<SourceInscription> sourceInscriptionCollection) {
this.sourceInscriptionCollection = sourceInscriptionCollection;
}
public Entreprise getEntreprise() {
return entreprise;
}
public void setEntreprise(Entreprise entreprise) {
this.entreprise = entreprise;
}
@XmlTransient
public List<CorrespondanceImportation> getCorrespondanceImportationCollection() {
return CorrespondanceImportationCollection;
}
public void setCorrespondanceImportationCollection(List<CorrespondanceImportation> CorrespondanceImportationCollection) {
this.CorrespondanceImportationCollection = CorrespondanceImportationCollection;
}
public Civilite getCivilite() {
return civilite;
}
public void setCivilite(Civilite civilite) {
this.civilite = civilite;
}
@XmlTransient
public List<Hotesse> getHotesseCollection() {
return hotesseCollection;
}
public void setHotesseCollection(List<Hotesse> hotesseCollection) {
this.hotesseCollection = hotesseCollection;
}
@XmlTransient
public List<Passage> getPassageCollection() {
return passageCollection;
}
public void setPassageCollection(List<Passage> passageCollection) {
this.passageCollection = passageCollection;
}
@XmlTransient
public List<SourceInscription> getPersonneUtilisateurSourceCollection() {
return PersonneUtilisateurSourceCollection;
}
public void setPersonneUtilisateurSourceCollection(List<SourceInscription> PersonneUtilisateurSourceCollection) {
this.PersonneUtilisateurSourceCollection = PersonneUtilisateurSourceCollection;
}
@XmlTransient
public List<Produit> getProduitCollection() {
return produitCollection;
}
public void setProduitCollection(List<Produit> produitCollection) {
this.produitCollection = produitCollection;
}
@XmlTransient
public List<Droit> getDroitCollection() {
return droitCollection;
}
public void setDroitCollection(List<Droit> droitCollection) {
this.droitCollection = droitCollection;
}
@XmlTransient
public List<ReponseClient> getReponseClientCollection() {
return reponseClientCollection;
}
public void setReponseClientCollection(List<ReponseClient> reponseClientCollection) {
this.reponseClientCollection = reponseClientCollection;
}
@XmlTransient
public List<AutreInformation> getAutreInformationCollection() {
return autreInformationCollection;
}
public void setAutreInformationCollection(List<AutreInformation> autreInformationCollection) {
this.autreInformationCollection = autreInformationCollection;
}
@XmlTransient
public List<Session> getSessionCollection() {
return sessionCollection;
}
public void setSessionCollection(List<Session> sessionCollection) {
this.sessionCollection = sessionCollection;
}
@Override
public int hashCode() {
int hash = 0;
hash += (keyClient != null ? keyClient.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Personne)) {
return false;
}
Personne other = (Personne) object;
if ((this.keyClient == null && other.keyClient != null) || (this.keyClient != null && !this.keyClient.equals(other.keyClient))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fr.ietevents.client.Entity.Personne[ keyClient=" + keyClient + " ]";
}
}
session 实体:
@Entity
@Table(name = "Session")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Session.findAll", query = "SELECT s FROM Session s"),
@NamedQuery(name = "Session.findByKeyEdition", query = "SELECT s FROM Session s WHERE s.keySession = :keySession"),
@NamedQuery(name = "Session.findByNom", query = "SELECT s FROM Session s WHERE s.nom = :nom")})
public class Session implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@NotNull
@Column(name = "KeySession")
private String keySession;
@Size(max = 90)
@Column(name = "Nom")
private String nom;
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "KeyAdresse")
private Adresse adresse ;
@OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Passage> passageCollection;
@OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Droit> droitCollection;
@OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Question> questionCollection;
@OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Css> cssCollection;
@OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<Site> siteCollection;
@OneToMany(mappedBy = "session",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<CrmLien> crmLienCollection;
@ManyToMany(mappedBy="sessionCollection",cascade = CascadeType.ALL)
private List<Personne> personneCollection;
public Session() {
}
public Session(String keySession) {
this.keySession = keySession;
}
public String getKeySession() {
return keySession;
}
public void setKeySession(String keyEdition) {
this.keySession = keyEdition;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public Adresse getAdresse() {
return adresse;
}
public void setAdresse(Adresse adresse) {
this.adresse = adresse;
}
@XmlTransient
public List<CrmLien> getCrmLienCollection() {
return crmLienCollection;
}
public void setCrmLienCollection(List<CrmLien> crmLienCollection) {
this.crmLienCollection = crmLienCollection;
}
@XmlTransient
public List<Passage> getPassageCollection() {
return passageCollection;
}
public void setPassageCollection(List<Passage> passageCollection) {
this.passageCollection = passageCollection;
}
@XmlTransient
public List<Droit> getDroitCollection() {
return droitCollection;
}
public void setDroitCollection(List<Droit> droitCollection) {
this.droitCollection = droitCollection;
}
@XmlTransient
public List<Question> getQuestionCollection() {
return questionCollection;
}
public void setQuestionCollection(List<Question> questionCollection) {
this.questionCollection = questionCollection;
}
@XmlTransient
public List<Css> getCssCollection() {
return cssCollection;
}
public void setCssCollection(List<Css> CssCollection) {
this.cssCollection = CssCollection;
}
@XmlTransient
public List<Site> getSiteCollection() {
return siteCollection;
}
public void setSiteCollection(List<Site> siteCollection) {
this.siteCollection = siteCollection;
}
@XmlTransient
public List<Personne> getPersonneCollection() {
return personneCollection;
}
public void setPersonneCollection(List<Personne> personneCollection) {
this.personneCollection = personneCollection;
}
@Override
public int hashCode() {
int hash = 0;
hash += (keySession != null ? keySession.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Session)) {
return false;
}
Session other = (Session) object;
if ((this.keySession == null && other.keySession != null) || (this.keySession != null && !this.keySession.equals(other.keySession))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fr.ietevents.client.Entity.Session[ keyEdition=" + keySession + " ]";
}
}
我的 Collection session 是一个对象 session 列表。
public Long CountPersonne(Session session,Pays pays){
EntityManager em = getEntityManager();
try{
Query query = em.createNamedQuery("Personne.CountPersonne");
query.setParameter("keySession",session.getKeySession());
// query.setParameter("keyPays",pays.getKeyPays());
return (Long) query.getSingleResult();
}catch(Exception e){
System.out.println(e);
return 0l;
}finally{
em.close();
}
}
错误消息:
javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [fr.ietevents_Client_war_1.0-SNAPSHOTPU] failed. Close all factories for this PersistenceUnit.
Internal Exception: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [SELECT COUNT(p) FROM Personne p WHERE p.sessionCollection.keySession = :keySession ].
[38, 68] The state field path 'p.sessionCollection.keySession' cannot be resolved to a valid type.
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createDeployFailedPersistenceException(EntityManagerSetupImpl.java:820)
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:760)
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:204)
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:182)
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getDatabaseSession(EntityManagerFactoryImpl.java:527)
org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:140)
org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:177)
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
fr.ietevents.client.Facades.SessionFacade.getEntityManager(SessionFacade.java:27)
fr.ietevents.client.Facades.AbstractFacade.find(AbstractFacade.java:96)
fr.ietevents.client.MyResource.getIt(MyResource.java:395)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
org.glassfish.jersey.internal.Errors.process(Errors.java:315)
org.glassfish.jersey.internal.Errors.process(Errors.java:297)
org.glassfish.jersey.internal.Errors.process(Errors.java:267)
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471)
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336)
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
最佳答案
您不能使用
p.sessionCollection.keySession
在 JPQL 中,因为那里有一个多值字段。您需要自己在查询中形成 JOIN,如下所示
SELECT COUNT(p) FROM Personne p JOIN p.sessionCollection sc WHERE sc.keySession = :keySession
关于java - USE JpaWhere 带有列表 := Key,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34851281/
如标题所示,ans_list是一个答案列表,ans_index是一个数字(答案在词汇表中的索引,但与atm无关) 这里生成的 tree.anslist 是什么? (例如,仅针对第一个),忽略迭代。 f
我目前将用户的输入存储在逗号分隔的列表中,如下所示: Userid | Options 1 | 1,2,5 用户在一个数组形式中勾选一组选项,然后用逗号连接起来 1,2,5 然后 MySQ
我目前将用户的输入存储在逗号分隔的列表中,如下所示: Userid | Options 1 | 1,2,5 用户在一个数组形式中勾选一组选项,然后用逗号连接起来 1,2,5 然后 MySQ
我想知道如何完全展平列表和包含它们的东西。除其他外,我想出了一个解决方案,它可以将具有多个元素的东西滑倒并将它们放回原处,或者在滑倒后将具有一个元素的东西拿走。 这与 How do I “flatte
我想知道如何完全展平列表和包含它们的东西。除其他外,我想出了一个解决方案,它可以将具有多个元素的东西滑倒并将它们放回原处,或者在滑倒后将带有一个元素的东西拿走。 这与 How do I “flatte
这个问题已经有答案了: Convert nested list to 2d array (3 个回答) 已关闭 7 年前。 java中有没有快捷方式可以转换 List> 到 String[][] ?
我在排序时遇到问题 List> 。我创建了一个自定义比较器,在其中编写了对数据进行排序的代码。 public class CustomComparator implements Comparator
这个问题已经有答案了: 已关闭10 年前。 Possible Duplicate: Java Generics: Cannot cast List to List? 我只是想知道为什么下面的java代
试图想出一个 LINQy 方法来做到这一点,但我什么也没想到。 我有一个对象列表<>,其中包含一个属性,该属性是逗号分隔的字母代码列表: lst[0].codes = "AA,BB,DD" lst[1
假设我有这些任务: points = [] point = (1, 2) 我怎么会这样做: points += point 它工作得很好,并且给了我点 = [1, 2]。但是,如果我这样做: poin
如何在 scala 中将 List[Task[List[Header]]] 类型转换为 Task[List[Header]]。 我有一个方法返回 Task[List[Header]] 并多次调用 do
如何在 Java 中查找二维列表的元素? 我有一个参数为 List> 的函数我想知道如何找到这个列表的行和列。 最佳答案 如果你喜欢 List> obj 然后你就可以像这样访问 obj.get(cur
分配 List到 List工作正常。 分配 List>到 List>不编译。 代码 public class Main { public static void main(String[] a
我正在用 Java 编写一个方法,该方法必须接收并迭代 Serializable 的 List。 有什么区别: public void myMethod(List list) { } 和 public
我看到很多人想用 mvvm 更新网格/列表/树的一部分,但他们不想刷新整个列表。 对于所有遇到此问题的人,我做了以下示例。 希望这对你有用。 最佳答案 这是一个简单的例子。整个代码中最重要的是: Bi
我正在为现有的 C++ 库编写包装器,该库使用列表,其中 T 是自定义结构。我被建议使用 vector 而不是列表,但我试图避免修改库。 为了更好地理解这个场景,我做了一个简单的应用程序,使用一个列表
List list List list 这两种声明有什么区别吗? 谢谢, 最佳答案 是的。 List可以包含所有派生自 Base 的不同事物的混合物. List包含同质项(从某种意义上说,它们必须全部
有人可以尽可能详细地解释以下类型之间的区别吗? List List List 让我更具体一点。我什么时候想使用 // 1 public void CanYouGiveMeAnAnswer(List l
我有一个元组列表,每个元组都是一对列表。所以我的数据看起来像: mylist = [(['foo', 'bar'], ['bar', 'bar']),(['bar', 'bar'],['bar', '
也许是一个时髦的标题,但我遇到了以下问题: 给定一个类型为 (a * b) list 的列表,我想创建一个类型为 (a * b list) list 的新列表。一个例子: 给定列表 let testL
我是一名优秀的程序员,十分优秀!