如何用jpa 2从连接表中删除行(how to delete row from join table with jpa 2)
我有一个生成连接表的关系,我需要做的是从该连接表中删除一行,但我甚至不知道如何进行jpql查询到达该表,因为它不是一个实体我的数据模型。
了解我的问题:
我有下表:
user ---(一对多)--->权限,即生成表user_permission。
我需要从user_permissions中删除行,因为如果我在权限中删除所有具有特定权限的用户将丢失它。
i have a relationship one to many that generated a join table , what i need to do is to delete a row from that join table, but i dont even know how to do the jpql query to get to that table because it's not an entity in my data model.
to give an idea of my issue :
i have the next tables:
user--- (one to many)---> permission, that generated the table user_permission.
i need to delete rows from user_permissions, because if i delete in permission all users with certain permission will lose it.
原文:https://stackoverflow.com/questions/14646484
最满意答案
我是nodejs的新手,最后我发现我应该在server.js中编写一个函数来处理get请求。
I am new to nodejs and finally I found that I should write a function in server.js to process the get request.
相关问答
更多-
高要南岸去高要白土一个人来回要多少钱?[2023-05-18]
200 -
默认情况下,它需要状态代码200. http://webtest.readthedocs.org/en/latest/testapp.html 要指示其他状态,请使用关键字参数status = 404(例如)检查它是否为404状态,或者status =“*”以允许任何状态,或者status =“400 Custom Bad Request”使用自定义原因短语。 如果您希望打印错误,请使用expect_errors = True。 By default it's expecting status code 2 ...
-
因此,通过关闭从Eclipse运行的Tomcat并重试应用程序和浏览器请求,我们发现某些进程正在窃取您的请求。 你可以通过运行netstat -nao | find "8080"来找到小偷 在Windows或netstat -nap | grep 8080上netstat -nao | find "8080" Linux上的netstat -nap | grep 8080 。 它应该显示一条LISTENING和127.0.0.1:8080的行,接下来将是进程ID。 So, by shutting down ...
-
强制Apache在.htaccess文件中发送200而不是404(Force Apache to send 200 instead of 404 in .htaccess file)[2024-04-25]
为了发送200状态而不是通常的404,您可以使用此重写规则: ErrorDocument 404 default RewriteEngine On RewriteBase / RewriteRule ^404\.html/?$ - [L] # If the requested file doesnt exist # and if the requested file is not an existing directory RewriteCond %{REQUEST_FILENAME} !-f Rewr ... -
您可以在execute方法返回的HttpResponse上使用getHeaders方法(请参阅http://developer.android.com/reference/org/apache/http/HttpMessage.html#getHeaders%28java.lang.String%29 )以访问所有Set-Cookie响应标题。 那些应该包含你想要的所有cookies。 You can probably use the getHeaders method (see http://develo ...
-
在POST时404但在GET上有200(404 on POST but 200 on GET)[2023-08-14]
我是nodejs的新手,最后我发现我应该在server.js中编写一个函数来处理get请求。 I am new to nodejs and finally I found that I should write a function in server.js to process the get request. -
Express Server似乎给出200然后在发布请求时给出404(Express Server seems to give 200 then gives 404 on post request)[2022-11-21]
您需要在登录表单中添加action="/login" (在views/index.jade ),如下所示: form(name="logins" id="loginfo" action="/login" role="form" method="post") // rest of view omitted You need to add action="/login" to your login form (in views/index.jade), like so: form(name="log ... -
POST响应在200,500和404之间不可预测地变化(POST response varies between 200, 500, and 404 unpredictably)[2023-05-11]
因此,事实证明,与任何javascript与scrapy交互通常是一场失败的战斗。 结束使用casperjs来实际执行这些请求并且效果很好。 我听说Selenium也适合这样的事情,但我还没有尝试过Selenium。 我以为我会给出更新。 So, it turns out that interacting with anything javascript with scrapy is generally a losing battle. Ended up using casperjs to actually ... -
未被捕获的OAuthException:(#200),当试图在墙上发布时(Uncaught OAuthException: (#200), when trying to post on wall)[2023-10-05]
这是一个工作片段,但请确保您已下载最新的PHP SDK即3.0.1如果您还没有,请从此处下载: https : //github.com/facebook/php-sdk/ 如果你仔细阅读下面的代码,你几乎可以理解它的作用,所以我不认为我必须向你解释更多?更正可能缺席的实体的HTTP状态代码:200或204或404(Correct HTTP status code for possible absent entity: 200 or 204 or 404)[2022-11-16]
广泛规则:不要试图使状态代码具体针对您的api或您的域模型的详细信息。 这些是对通用组件(如浏览器,缓存,代理)的消息,这些组件不需要了解有关域模型和集成协议的细节的任何信息。 404:这绝对应该是... / sender / {sender_id}的答案。 但在这种情况下,我们询问文件的发件人,没有发件人是正确的答案...... 4xx类响应代码表示客户端请求中的错误 。 换句话说,客户问错了。 404特别暗示客户端将请求发送到错误的集成资源。 所以这不是你想要的。 204:我认为是正确的状态,但这主要用 ...相关文章
更多- JPA环境配置
- JPA ORM框架介绍
- JPA高级映射(继承)
- hibernate 多表 join 查询发现还是会重新load one-to-many 子表
- 使用Hadoop的datajoin包进行关系型join操作
- Memcached delete 删除key
- JPA JPQL 工作原理与持久性
- HDFS导出数据到HBase的ROW VALUE设置tricks
- HttpClient DELETE请求示例
- solr delete query
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)