首页 \ 问答 \ Booksleeve是否适用于Windows Redis(Redis作为Windows服务安装)?(Does Booksleeve work with a windows Redis (Redis installed as a Windows Service)?)

Booksleeve是否适用于Windows Redis(Redis作为Windows服务安装)?(Does Booksleeve work with a windows Redis (Redis installed as a Windows Service)?)

Booksleeve是否适用于Windows Redis(Redis作为Windows服务安装)?

我安装Redis作为Windows服务 ,我想知道是否可以使用BookSleeve? 或者BookSleeve专门用于安装在Unix系统上的Redis吗?


Does Booksleeve work with a windows Redis (Redis installed as a Windows Service) ?

I Installed Redis as a Windows Service and I wanted to know if it was possible to use BookSleeve with it? Or is BookSleeve exclusively for a Redis installed on a Unix system?


原文:
更新时间:2022-04-10 13:04

最满意答案

collection1的类型为Collection 。 而Collection没有collection2字段。 这就是我对这些查询的理由。

您必须在集合上创建显式连接:

select e from Entity1 e
left join fetch e.collection1 as c1
left join fetch c1.collection2 as c2

请注意,这将生成笛卡尔积,因此可能会返回大量行。 另请注意,只有两个集合中的一个至少是一个集合才有可能。 如果它们都是包,那么Hibernate在执行查询时会抛出异常。


collection1 is of type Collection. And a Collection doesn't have a collection2 field. That's how I reason about those kind of queries.

You must the create an explicit join over the collection:

select e from Entity1 e
left join fetch e.collection1 as c1
left join fetch c1.collection2 as c2

Note that this will produce a cartesian product, and thus petentially returns a huge number of rows. Also note that it will only be possible if one of the two collections at least is a set. If they're both bags, Hibernate will throw an exception when executing the query.

相关问答

更多
  • 在JPQL中,规范中也是如此。 JPA规范不允许将别名赋予获取联接。 问题在于,通过限制联合抓取的上下文,您可以轻松地将自己拍摄在脚下。 加入两次更安全。 ToMany通常比ToOnes更像一个问题。 例如, Select e from Employee e join fetch e.phones p where p.areaCode = '613' 这将错误地返回所有包含'613'区号中号码的员工,但会在返回列表中排除其他地区的电话号码。 这意味着在613和416区号中有电话的员工将丢失416电话号 ...
  • “fetch”告诉hibernate现在加载它,而不是让它懒洋洋地加载。 参考指南有整个章节处理这些事情,这是很好的熟悉。 The "fetch" tells hibernate to load it now instead of letting it be loaded lazily. The reference guide has a whole chapter dealing with such things that it's good to be acquainted with.
  • 在这两个查询中,您使用JOIN来查询至少有一个部门关联的所有员工。 但是,区别是:在第一个查询中,您只返回Hibernate的Employes。 在第二个查询中,您将返回Employes 和所有部门关联。 因此,如果使用第二个查询,则不需要再次查询新数据库以查看每个员工的部门。 当您确定需要每个员工的部门时,可以使用第二个查询。 如果您不需要Department,请使用第一个查询。 如果您需要应用某些WHERE条件(您可能需要什么),我建议阅读此链接: 如何正确表达JPQL“join fetch”与“whe ...
  • 我认为这些文档描述得非常好。 如果您使用读取连接,相关实体将包含在水合结果中。 否则,他们不会,如果您尝试访问它们,它会触发另一个查询来获取信息。 这只是它是否应该包含在结果中的问题。 I think the docs describe it pretty well. If you use a fetch join, the related entities will be included in the hydrated result. Otherwise they won't, and if you t ...
  • 试试这种方式: $query = mysql_query("SELECT t2.*, t1.hotelprice FROM t2 LEFT JOIN t1 ON t2.url = t1.tid WHERE area = '".$area."'"); while ( $row = mysql_fetch_array($query) ){ $node = $dom->createElement("marker ...
  • 请记住,最后,JOIN FETCH始终是JOIN。 默认情况下, @OneToMany关系是延迟加载的。 使用JOIN FETCH可以提前加载相关实体。 你可以找到更多信息阅读FETCH JOIN仍然是 Piotr Nowicki 的加入 Remember that, in the end, JOIN FETCH is always a JOIN. By default @OneToMany relationships are lazy loaded. Using JOIN FETCH you load t ...
  • 取得加入和过滤收集不是一起工作得很好的事情。 以下是你应该这样做的方法: SELECT u, p FROM User u JOIN u.phonenumbers p JOIN u.phonenumbers p2 WHERE u.id = :id AND p2.type = :type 这对第二个加入的(而不是水合的) p2应用过滤,这导致了正确的水合和过滤。 Fetch joining and filtering a collecti ...
  • 检查一个SQL语法,你不能在where子句之后使用left join 。 如果您正在查看命名查询的SQL生成表单,您将看到查询中的连接表在连接之后出现where子句,并且应指定通过键链接这些表的相等条件。 左侧主表的主键和右侧连接表的外键。 连接表由多对一关联的属性指定。 @NamedQuery( name = "findOneWithLists", query = "from Table t left join User u where u.id= :id" ) Check a SQL ...
  • 来自JPA规范 将setMaxResults或setFirstResult应用于涉及对集合进行提取连接的查询的效果未定义。 (JPA“Enterprise JavaBeans 3.0,Final Release”,Kapitel 3.6.1查询接口) Hibernate做正确的事情,但在内存中执行查询的一部分,这是非常慢的。 在我的情况下,差异在3-5毫秒到400-500毫秒之间。 我的解决方案是在查询本身内实现分页。 与JOIN FETCH一起快速工作。 after increasing memory f ...
  • collection1的类型为Collection 。 而Collection没有collection2字段。 这就是我对这些查询的理由。 您必须在集合上创建显式连接: select e from Entity1 e left join fetch e.collection1 as c1 left join fetch c1.collection2 as c2 请注意,这将生成笛卡尔积,因此可能会返回大量行。 另请注意,只有两个集合中的一个至少是一个集合才有可能。 如果它们都是包,那么Hibernate在 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。