JPA使用本机或命名查询返回HashMap >(JPA return HashMap> using Native or Named Query)
我有一个具有以下结构的表:
ID id_client id_order 1 1 10 2 1 15 3 1 13 4 2 20 5 2 40 6 2 9
我的问题是:如何创建一个返回结果的查询(命名或本机)
HashMap<Integer,ArrayList<Integer>>
我的地图包含一个唯一的id_client,其中包含一个所有id_order的arrayList:
1=>10,15,13 2=>20,40,9
注意 ; 我正在使用EclipseLink作为JPA实现
提前致谢。
i have a table with the folowing structure :
ID id_client id_order 1 1 10 2 1 15 3 1 13 4 2 20 5 2 40 6 2 9
my issue is : how to create a query(named or native) that return the result as
HashMap<Integer,ArrayList<Integer>>
my map contains a unique id_client with an arrayList of all id_order:
1=>10,15,13 2=>20,40,9
note ; i'm using EclipseLink as a JPA implementation
thanks in advance.
原文:https://stackoverflow.com/questions/38919621
更新时间:2023-07-04 20:07
最满意答案
相关问答
更多-
因此,事实证明,问题是由于某些使用MVCTurbine和StructureMap,但似乎问题也可能发生在其他IOC容器上,而不仅仅是StructureMap。 MVCTurbine的作者表示修复将在该产品的2.2版本中。 与此同时,Global.asax中的一行额外代码将解决此问题: //VNEXT: after Turbine 2.2 we wont need this line anymore... protected override void ShutdownContext() { CurrentC ...
-
在Expressor Web Developer Edition中没有Attach To Process 。 您需要购买完整版。 看到这里 。 Attach To Process is not available in the Expressor the Web Developer Editions. You will need to purchase a full version. See here.
-
传递给服务器的磁盘路径(路径参数)包含双斜杠时会发生这种情况。 (即d:\somedir1\\somedir2 ) This happens when disk path passed to the server (the path parameter) contains a double slash. (i.e. d:\somedir1\\somedir2)
-
停止进程正在扼杀它。 为什么你需要“停止”这个过程而不杀死它? “停止”这个过程是什么意思? 您可以使用此工具暂停和恢复进程。 Stopping a process is killing it. Why do you need to "stop" the process without killing it? What do you mean by "stopping" the process? You can use this tool to pause and resume processes.
-
更改VS2008项目的默认Webdev.Webserver物理路径(Change default Webdev.Webserver Physical Path on a VS2008 project)[2022-10-20]
如果您试图从与域相关的文件中分离与Web相关的文件,那么您最好做的就是在同一解决方案中创建单独的项目。 假设您创建商店解决方案。 然后,您可以创建名为Store.Web,Store.Domain,Store.Test等的不同项目。 If you are trying to separate Web-related files from, say, Domain-related files, the best you have to do is to created separate projects ins ... -
感谢Anthony和AlaN的建议。 重要的是要检查错误的可能性,就像这个模糊一样。 Microsoft支持使用tttracing实用程序发现了该问题。 恶意软件应用程序创建了一个包含以下内容的文件夹:aecbbldsrvrc.dll。 ...应用程序数据\本地\ exction \ aecbbldsrvrc.dll 这个dll被添加到用于调试的dll混合中。 怎么会发生,我还没有线索。 Google搜索aecbbldsrvrc.dll会返回很多评论。 顺便说一句,因为我已经在网络适配器上禁用了IPV6和Q ...
-
找不到应用程序的入口点:WebDev.WebServer40.EXE -(Entry Point Not Found for a application: WebDev.WebServer40.EXE -)[2022-04-14]
我为自己的问题找到了解决方案。 问题是我在References使用的Oracle.DataAccess版本。 我从References删除Oracle.DataAccess ,并将其添加回最新版本。 I found the solution for my own problem. The issue is the Oracle.DataAccess version that i use in References. I remove Oracle.DataAccess from References, an ... -
WebDev.WebServer.EXE在VS 2008 SP1安装后崩溃(WebDev.WebServer.EXE Crashes After VS 2008 SP1 Install)[2022-09-04]
事件日志的“应用程序”部分中是否有任何内容? 您尝试过使用其他端口吗? 根据这个帖子 ,尝试: 从Visual Source解除绑定安全,从解决方案中删除Web项目,重命名存储网站的文件夹,然后重新添加到现有网站的解决方案,然后再次绑定到源安全。 您的.suo或.sln文件中可能包含一些不正确的信息。 你可以安全地重命名前者,因为它是用户特定的(解决方案); 后者(这个问题本身)会让你重新创造一些麻烦。 Is there anything in the Application section of the ... -
唯一可以确定的方法是挖掘Cassini源代码,并查看是否有任何区域在堆上生成代码,然后在不清除NX标志的情况下执行它。 但是,而不是这样做,为什么不使用IIS? 编辑: 禁用DEP的危险在于您打开了安全漏洞。 DEP的工作原理是不允许执行堆上任意生成的代码。 这有助于防止恶意软件程序将代码插入到合法程序的数据段中。 The only way to know for sure would be to dig through the Cassini source and see if there are any ...
-
请尝试重建您的应用程序,然后运行。 如果这不起作用,请在任务管理器中杀死所有进程,如WebDev.WebServer,然后运行。 如果这也不起作用,请尝试在下面提到的解决方案: http://forums.asp.net/t/1583577.aspx http://www.codeproject.com/Questions/72542/webdev-webserver-exe 在VS2010中添加/删除文件会导致“WebDev.WebServer20.exe已停止工作”错误 让我感到困惑的一件事是你得到进程 ...