|
Hibernate example source code file (query_hql.po)
This example Hibernate source code file (query_hql.po) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Hibernate query_hql.po source code
# translation of Collection_Mapping.po to
# Xi Huang <xhuang@redhat.com>, 2006.
# Xi HUANG <xhuang@redhat.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-11T05:38:15\n"
"PO-Revision-Date: 2010-03-16 10:03+1000\n"
"Last-Translator: Xi HUANG <xhuang@redhat.com>\n"
"Language-Team: <en@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#, no-c-format
msgid "HQL: The Hibernate Query Language"
msgstr "HQL: Hibernate 查询è¯è¨€"
#. Tag: para
#, no-c-format
msgid "Hibernate uses a powerful query language (HQL) that is similar in appearance to SQL. Compared with SQL, however, HQL is fully object-oriented and understands notions like inheritance, polymorphism and association."
msgstr "Hibernate é…备了一ç§éžå¸¸å¼ºå¤§çš„查询è¯è¨€ï¼Œè¿™ç§è¯è¨€çœ‹ä¸ŠåŽ»å¾ˆåƒ SQL。但是ä¸è¦è¢«è¯æ³•ç»“构上的相似所迷惑,HQL 是éžå¸¸æœ‰æ„识的被设计为完全é¢å‘对象的查询,它å¯ä»¥ç†è§£å¦‚继承ã€å¤šæ€å’Œå…³è”之类的概念。 "
#. Tag: title
#, no-c-format
msgid "Case Sensitivity"
msgstr "大å°å†™æ•æ„Ÿæ€§é—®é¢˜"
#. Tag: para
#, no-c-format
msgid "With the exception of names of Java classes and properties, queries are case-insensitive. So <literal>SeLeCT is the same as sELEct is the same as SELECT, but org.hibernate.eg.FOO is not org.hibernate.eg.Foo, and foo.barSet is not foo.BARSET."
msgstr "除了 Java 类与属性的å称外,查询è¯å¥å¯¹å¤§å°å†™å¹¶ä¸æ•æ„Ÿã€‚ 所以 <literal>SeLeCT 与 sELEct ä»¥åŠ SELECT 是相åŒçš„,但是 org.hibernate.eg.FOO 并ä¸ç‰ä»·äºŽ org.hibernate.eg.Foo 并且 foo.barSet 也ä¸ç‰ä»·äºŽ foo.BARSET。 "
#. Tag: para
#, no-c-format
msgid "This manual uses lowercase HQL keywords. Some users find queries with uppercase keywords more readable, but this convention is unsuitable for queries embedded in Java code."
msgstr "本手册ä¸çš„ HQL 关键å—将使用å°å†™å—æ¯ã€‚很多用户å‘现使用完全大写的关键å—会使查询è¯å¥çš„å¯è¯»æ€§æ›´å¼ºï¼Œä½†æˆ‘们å‘现,当把查询è¯å¥åµŒå…¥åˆ° Java è¯å¥ä¸çš„时候使用大写关键å—比较难看。"
#. Tag: title
#, no-c-format
msgid "The from clause"
msgstr "from åå¥"
#. Tag: para
#, no-c-format
msgid "The simplest possible Hibernate query is of the form:"
msgstr "Hibernate ä¸æœ€ç®€å•çš„查询è¯å¥çš„å½¢å¼å¦‚下:"
#. Tag: para
#, no-c-format
msgid "This returns all instances of the class <literal>eg.Cat. You do not usually need to qualify the class name, since auto-import is the default. For example:"
msgstr "该åå¥ç®€å•çš„返回 <literal>eg.Cat 类的所有实例。通常我们ä¸éœ€è¦ä½¿ç”¨ç±»çš„å…¨é™å®šåï¼Œå› ä¸º auto-import(自动引入)是缺çœçš„æƒ…å†µã€‚æ‰€ä»¥æˆ‘ä»¬å‡ ä¹Žåªä½¿ç”¨å¦‚下的简å•å†™æ³•ï¼š "
#. Tag: para
#, no-c-format
msgid "In order to refer to the <literal>Cat in other parts of the query, you will need to assign an alias. For example:"
msgstr "为了在这个查询的其他部分里引用 <literal>Catï¼Œä½ å°†éœ€è¦åˆ†é…一个别å。例如:"
#. Tag: para
#, no-c-format
msgid "This query assigns the alias <literal>cat to Cat instances, so you can use that alias later in the query. The as keyword is optional. You could also write:"
msgstr "这个è¯å¥æŠŠåˆ«å <literal>cat 指定给类Cat çš„å®žä¾‹ï¼Œè¿™æ ·æˆ‘ä»¬å°±å¯ä»¥åœ¨éšåŽçš„查询ä¸ä½¿ç”¨æ¤åˆ«åäº†ã€‚å…³é”®å— as 是å¯é€‰çš„,我们也å¯ä»¥è¿™æ ·å†™ï¼š "
#. Tag: para
#, no-c-format
msgid "Multiple classes can appear, resulting in a cartesian product or \"cross\" join."
msgstr "åå¥ä¸å¯ä»¥åŒæ—¶å‡ºçŽ°å¤šä¸ªç±»ï¼Œå…¶æŸ¥è¯¢ç»“果是产生一个笛å¡å„¿ç§¯æˆ–产生跨表的连接。 "
#. Tag: para
#, no-c-format
msgid "It is good practice to name query aliases using an initial lowercase as this is consistent with Java naming standards for local variables (e.g. <literal>domesticCat)."
msgstr "查询è¯å¥ä¸åˆ«å的开头部分å°å†™è¢«è®¤ä¸ºæ˜¯å®žè·µä¸çš„å¥½ä¹ æƒ¯ï¼Œè¿™æ ·åšä¸Ž Java å˜é‡çš„命åæ ‡å‡†ä¿æŒäº†ä¸€è‡´ï¼ˆæ¯”如,<literal>domesticCat)。 "
#. Tag: title
#, no-c-format
msgid "Associations and joins"
msgstr "å…³è”(Association)与连接(Join)"
#. Tag: para
#, no-c-format
msgid "You can also assign aliases to associated entities or to elements of a collection of values using a <literal>join. For example:"
msgstr "我们也å¯ä»¥ä¸ºç›¸å…³è”的实体甚至是对一个集åˆä¸çš„å…¨éƒ¨å…ƒç´ æŒ‡å®šä¸€ä¸ªåˆ«å,这时è¦ä½¿ç”¨å…³é”®å— <literal>join。 "
#. Tag: para
#, no-c-format
msgid "The supported join types are borrowed from ANSI SQL:"
msgstr "å—支æŒçš„连接类型是从 ANSI SQL ä¸å€Ÿé‰´æ¥çš„:"
#. Tag: para
#, no-c-format
msgid "<literal>inner join"
msgstr "<literal>inner join"
#. Tag: para
#, no-c-format
msgid "<literal>left outer join"
msgstr "<literal>left outer join"
#. Tag: para
#, no-c-format
msgid "<literal>right outer join"
msgstr "<literal>right outer join"
#. Tag: para
#, no-c-format
msgid "<literal>full join (not usually useful)"
msgstr "<literal>full join(全连接,并ä¸å¸¸ç”¨ï¼‰"
#. Tag: para
#, no-c-format
msgid "The <literal>inner join, left outer join and right outer join constructs may be abbreviated."
msgstr "è¯å¥ <literal>inner join,left outer join ä»¥åŠ right outer join å¯ä»¥ç®€å†™ã€‚"
#. Tag: para
#, no-c-format
msgid "You may supply extra join conditions using the HQL <literal>with keyword."
msgstr "通过 HQL çš„ <literal>with 关键å—ï¼Œä½ å¯ä»¥æä¾›é¢å¤–çš„ join æ¡ä»¶ã€‚"
#. Tag: para
#, no-c-format
msgid "A \"fetch\" join allows associations or collections of values to be initialized along with their parent objects using a single select. This is particularly useful in the case of a collection. It effectively overrides the outer join and lazy declarations of the mapping file for associations and collections. See <xref linkend=\"performance-fetching\" /> for more information."
msgstr "还有,一个 \"fetch\" 连接å…许仅仅使用一个选择è¯å¥å°±å°†ç›¸å…³è”的对象或一组值的集åˆéšç€ä»–们的父对象的åˆå§‹åŒ–而被åˆå§‹åŒ–,这ç§æ–¹æ³•åœ¨ä½¿ç”¨åˆ°é›†åˆçš„情况下尤其有用,对于关è”和集åˆæ¥è¯´ï¼Œå®ƒæœ‰æ•ˆçš„ä»£æ›¿äº†æ˜ å°„æ–‡ä»¶ä¸çš„外è”接与延迟声明(lazy declarations)。查看 <xref linkend=\"performance-fetching\" /> 以获得ç‰å¤šçš„ä¿¡æ¯ã€‚ "
#. Tag: para
#, no-c-format
msgid "A fetch join does not usually need to assign an alias, because the associated objects should not be used in the <literal>where clause (or any other clause). The associated objects are also not returned directly in the query results. Instead, they may be accessed via the parent object. The only reason you might need an alias is if you are recursively join fetching a further collection:"
msgstr "一个 fetch 连接通常ä¸éœ€è¦è¢«æŒ‡å®šåˆ«åï¼Œå› ä¸ºç›¸å…³è”的对象ä¸åº”当被用在 <literal>where åå¥ï¼ˆæˆ–其它任何åå¥ï¼‰ä¸ã€‚åŒæ—¶ï¼Œç›¸å…³è”的对象并ä¸åœ¨æŸ¥è¯¢çš„结果ä¸ç›´æŽ¥è¿”回,但å¯ä»¥é€šè¿‡ä»–们的父对象æ¥è®¿é—®åˆ°ä»–们。 "
#. Tag: para
#, no-c-format
msgid "The <literal>fetch construct cannot be used in queries called using iterate() (though scroll() can be used). Fetch should be used together with setMaxResults() or setFirstResult(), as these operations are based on the result rows which usually contain duplicates for eager collection fetching, hence, the number of rows is not what you would expect. Fetch should also not be used together with impromptu with condition. It is possible to create a cartesian product by join fetching more than one collection in a query, so take care in this case. Join fetching multiple collection roles can produce unexpected results for bag mappings, so user discretion is advised when formulating queries in this case. Finally, note that full join fetch and right join fetch are not meaningful."
msgstr "å‡è‹¥ä½¿ç”¨ <literal>iterate() æ¥è°ƒç”¨æŸ¥è¯¢ï¼Œè¯·æ³¨æ„ fetch æž„é€ æ˜¯ä¸èƒ½ä½¿ç”¨çš„(scroll() å¯ä»¥ä½¿ç”¨ï¼‰ã€‚fetch 也ä¸åº”该与 setMaxResults() 或 setFirstResult() å…±ç”¨ï¼Œè¿™æ˜¯å› ä¸ºè¿™äº›æ“作是基于结果集的,而在预先抓å–集åˆç±»æ—¶å¯èƒ½åŒ…å«é‡å¤çš„æ•°æ®ï¼Œä¹Ÿå°±æ˜¯è¯´æ— 法预先知é“精确的行数。fetch 还ä¸èƒ½ä¸Žç‹¬ç«‹çš„ with æ¡ä»¶ä¸€èµ·ä½¿ç”¨ã€‚é€šè¿‡åœ¨ä¸€æ¬¡æŸ¥è¯¢ä¸ fetch 多个集åˆï¼Œå¯ä»¥åˆ¶é€ 出笛å¡å°”ç§¯ï¼Œå› æ¤è¯·å¤šåŠ 注æ„。对 bag æ˜ å°„æ¥è¯´ï¼ŒåŒæ—¶ join fetch 多个集åˆè§’色å¯èƒ½åœ¨æŸäº›æƒ…况下给出并éžé¢„期的结果,也请å°å¿ƒã€‚最åŽæ³¨æ„,使用 full join fetch 与 right join fetch 是没有æ„义的。 "
#. Tag: para
#, no-c-format
msgid "If you are using property-level lazy fetching (with bytecode instrumentation), it is possible to force Hibernate to fetch the lazy properties in the first query immediately using <literal>fetch all properties."
msgstr "å¦‚æžœä½ ä½¿ç”¨å±žæ€§çº§åˆ«çš„å»¶è¿ŸèŽ·å–(lazy fetching)(这是通过é‡æ–°ç¼–写å—节ç 实现的),å¯ä»¥ä½¿ç”¨ <literal>fetch all properties æ¥å¼ºåˆ¶ Hibernate ç«‹å³å–得那些原本需è¦å»¶è¿ŸåŠ 载的属性(在第一个查询ä¸ï¼‰ã€‚ "
#. Tag: title
#, no-c-format
msgid "Forms of join syntax"
msgstr "join è¯æ³•çš„å½¢å¼"
#. Tag: para
#, no-c-format
msgid "HQL supports two forms of association joining: <literal>implicit and explicit."
msgstr "HQL 支æŒä¸¤ç§å…³è” join çš„å½¢å¼ï¼š<literal>implicit(éšå¼ï¼‰ 与 explicit(显å¼ï¼‰ã€‚"
#. Tag: para
#, no-c-format
msgid "The queries shown in the previous section all use the <literal>explicit form, that is, where the join keyword is explicitly used in the from clause. This is the recommended form."
msgstr "上一节ä¸ç»™å‡ºçš„查询都是使用 <literal>explicit(显å¼ï¼‰å½¢å¼çš„ï¼Œå…¶ä¸ form åå¥ä¸æ˜Žç¡®ç»™å‡ºäº† join 关键å—。这是建议使用的方å¼ã€‚ "
#. Tag: para
#, no-c-format
msgid "The <literal>implicit form does not use the join keyword. Instead, the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement."
msgstr "<literal>implicit(éšå¼ï¼‰å½¢å¼ä¸ä½¿ç”¨ join 关键å—。关è”使用\"点å·\"æ¥è¿›è¡Œâ€œå¼•ç”¨â€ã€‚implicit join å¯ä»¥åœ¨ä»»ä½• HQL åå¥ä¸å‡ºçŽ°ã€‚implicit join 在最终的 SQL è¯å¥ä¸ä»¥ inner join çš„æ–¹å¼å‡ºçŽ°ã€‚"
#. Tag: title
#, no-c-format
msgid "Referring to identifier property"
msgstr "引用 identifier 属性 "
#. Tag: para
#, no-c-format
msgid "There are 2 ways to refer to an entity's identifier property:"
msgstr "通常有两ç§æ–¹æ³•æ¥å¼•ç”¨å®žä½“çš„ identifier 属性: "
#. Tag: para
#, no-c-format
msgid "The special property (lowercase) <literal>id may be used to reference the identifier property of an entity provided that the entity does not define a non-identifier property named id."
msgstr "特殊属性(lowercase)<literal>id å¯ä»¥ç”¨æ¥å¼•ç”¨å®žä½“çš„ identifier 属性 å‡è®¾è¿™ä¸ªå®žä½“没有定义用 non-identifier 属性命åçš„ id。 "
#. Tag: para
#, no-c-format
msgid "If the entity defines a named identifier property, you can use that property name."
msgstr "如果这个实体定义了 identifier å±žæ€§ï¼Œä½ å¯ä»¥ä½¿ç”¨å±žæ€§å。 "
#. Tag: para
#, no-c-format
msgid "References to composite identifier properties follow the same naming rules. If the entity has a non-identifier property named id, the composite identifier property can only be referenced by its defined named. Otherwise, the special <literal>id property can be used to reference the identifier property."
msgstr "å¯¹ç»„åˆ identifier 属性的引用éµå¾ªç›¸åŒçš„命å规则。如果实体有一个 non-identifier 属性命åçš„ idï¼Œè¿™ä¸ªç»„åˆ identifier 属性åªèƒ½ç”¨è‡ªå·±å®šä¹‰çš„åå—æ¥å¼•ç”¨ï¼›å¦åˆ™ï¼Œç‰¹æ®Š <literal>id 属性å¯ä»¥ç”¨æ¥å¼•ç”¨ identifier 属性。 "
#. Tag: para
#, no-c-format
msgid "Please note that, starting in version 3.2.2, this has changed significantly. In previous versions, <literal>id always referred to the identifier property regardless of its actual name. A ramification of that decision was that non-identifier properties named id could never be referenced in Hibernate queries."
msgstr "注æ„:从 3.2.2 版本开始,这已ç»æ”¹å˜äº†å¾ˆå¤šã€‚在å‰é¢çš„版本里,ä¸ç®¡å®žé™…çš„åå—,<literal>id æ€»æ˜¯æŒ‡å‘ identifier 属性;而用 non-identifier 属性命åçš„ id 就从æ¥ä¸åœ¨ Hibernate 查询里引用。 "
#. Tag: title
#, no-c-format
msgid "The select clause"
msgstr "select åå¥"
#. Tag: para
#, no-c-format
msgid "The <literal>select clause picks which objects and properties to return in the query result set. Consider the following:"
msgstr "<literal>select åå¥é€‰æ‹©å°†å“ªäº›å¯¹è±¡ä¸Žå±žæ€§è¿”回到查询结果集ä¸ã€‚考虑如下情况:"
#. Tag: para
#, no-c-format
msgid "The query will select <literal>mates of other Cats. You can express this query more compactly as:"
msgstr "该è¯å¥å°†é€‰æ‹©å…¶å®ƒ <literal>Cat çš„ mate(其他猫的é…å¶ï¼‰ã€‚å®žé™…ä¸Šï¼Œä½ å¯ä»¥æ›´ç®€æ´çš„用以下的查询è¯å¥è¡¨è¾¾ç›¸åŒçš„å«ä¹‰ï¼š "
#. Tag: para
#, no-c-format
msgid "Queries can return properties of any value type including properties of component type:"
msgstr "查询è¯å¥å¯ä»¥è¿”回值为任何类型的属性,包括返回类型为æŸç§ç»„件(Component)的属性: "
#. Tag: para
#, no-c-format
msgid "Queries can return multiple objects and/or properties as an array of type <literal>Object[]:"
msgstr "查询è¯å¥å¯ä»¥è¿”回多个对象和(或)属性,å˜æ”¾åœ¨ <literal>Object[] 队列ä¸ï¼Œ "
#. Tag: para
#, no-c-format
msgid "Or as a <literal>List:"
msgstr "或å˜æ”¾åœ¨ä¸€ä¸ª <literal>List 对象ä¸ï¼š"
#. Tag: para
#, no-c-format
msgid "Or - assuming that the class <literal>Family has an appropriate constructor - as an actual typesafe Java object:"
msgstr "å‡è®¾ç±» <literal>Family 有一个åˆé€‚çš„æž„é€ å‡½æ•° - 作为实际的类型安全的 Java 对象:"
#. Tag: para
#, no-c-format
msgid "You can assign aliases to selected expressions using <literal>as:"
msgstr "ä½ å¯ä»¥ä½¿ç”¨å…³é”®å— <literal>as 给“被选择了的表达å¼â€æŒ‡æ´¾åˆ«å: "
#. Tag: para
#, no-c-format
msgid "This is most useful when used together with <literal>select new map:"
msgstr "è¿™ç§åšæ³•åœ¨ä¸Žåå¥ <literal>select new map 一起使用时最有用:"
#. Tag: para
#, no-c-format
msgid "This query returns a <literal>Map from aliases to selected values."
msgstr "该查询返回了一个 <literal>Map 的对象,内容是别å与被选择的值组æˆçš„å-å€¼æ˜ å°„ã€‚"
#. Tag: title
#, no-c-format
msgid "Aggregate functions"
msgstr "èšé›†å‡½æ•°"
#. Tag: para
#, no-c-format
msgid "HQL queries can even return the results of aggregate functions on properties:"
msgstr "HQL 查询甚至å¯ä»¥è¿”回作用于属性之上的èšé›†å‡½æ•°çš„计算结果: "
#. Tag: para
#, no-c-format
msgid "The supported aggregate functions are:"
msgstr "å—支æŒçš„èšé›†å‡½æ•°å¦‚下: "
#. Tag: para
#, no-c-format
msgid "<literal>avg(...), sum(...), min(...), max(...)"
msgstr "<literal>avg(...), sum(...), min(...), max(...) "
#. Tag: para
#, no-c-format
msgid "<literal>count(*)"
msgstr "<literal>count(*)"
#. Tag: para
#, no-c-format
msgid "<literal>count(...), count(distinct ...), count(all...)"
msgstr "<literal>count(...), count(distinct ...), count(all...)"
#. Tag: para
#, no-c-format
msgid "You can use arithmetic operators, concatenation, and recognized SQL functions in the select clause:"
msgstr "ä½ å¯ä»¥åœ¨é€‰æ‹©åå¥ä¸ä½¿ç”¨æ•°å¦æ“作符ã€è¿žæŽ¥ä»¥åŠç»è¿‡éªŒè¯çš„ SQL 函数: "
#. Tag: para
#, no-c-format
msgid "The <literal>distinct and all keywords can be used and have the same semantics as in SQL."
msgstr "å…³é”®å— <literal>distinct 与 all 也å¯ä»¥ä½¿ç”¨ï¼Œå®ƒä»¬å…·æœ‰ä¸Ž SQL 相åŒçš„è¯ä¹‰ã€‚ "
#. Tag: title
#, no-c-format
msgid "Polymorphic queries"
msgstr "多æ€æŸ¥è¯¢"
#. Tag: para
#, no-c-format
msgid "A query like:"
msgstr "一个如下的查询è¯å¥ï¼š"
#. Tag: para
#, no-c-format
msgid "returns instances not only of <literal>Cat, but also of subclasses like DomesticCat. Hibernate queries can name any Java class or interface in the from clause. The query will return instances of all persistent classes that extend that class or implement the interface. The following query would return all persistent objects:"
msgstr "ä¸ä»…返回 <literal>Cat 类的实例,也åŒæ—¶è¿”回åç±» DomesticCat 的实例。Hibernate å¯ä»¥åœ¨ from åå¥ä¸æŒ‡å®šä»»ä½• Java 类或接å£ã€‚查询会返回继承了该类的所有æŒä¹…化å类的实例或返回声明了该接å£çš„所有æŒä¹…化类的实例。下é¢çš„查询è¯å¥è¿”回所有的被æŒä¹…化的对象: "
#. Tag: para
#, no-c-format
msgid "The interface <literal>Named might be implemented by various persistent classes:"
msgstr "æŽ¥å£ <literal>Named å¯èƒ½è¢«å„ç§å„æ ·çš„æŒä¹…化类声明:"
#. Tag: para
#, no-c-format
msgid "These last two queries will require more than one SQL <literal>SELECT. This means that the order by clause does not correctly order the whole result set. It also means you cannot call these queries using Query.scroll()."
msgstr "注æ„,最åŽçš„两个查询将需è¦è¶…过一个的 SQL <literal>SELECT。这表明 order by åå¥æ²¡æœ‰å¯¹æ•´ä¸ªç»“果集进行æ£ç¡®çš„排åºã€‚ï¼ˆè¿™ä¹Ÿè¯´æ˜Žä½ ä¸èƒ½å¯¹è¿™æ ·çš„查询使用 Query.scroll() 方法。)"
#. Tag: title
#, no-c-format
msgid "The where clause"
msgstr "where åå¥"
#. Tag: para
#, no-c-format
msgid "The <literal>where clause allows you to refine the list of instances returned. If no alias exists, you can refer to properties by name:"
msgstr "<literal>where åå¥å…è®¸ä½ å°†è¿”å›žçš„å®žä¾‹åˆ—è¡¨çš„èŒƒå›´ç¼©å°ã€‚如果没有指定别åï¼Œä½ å¯ä»¥ä½¿ç”¨å±žæ€§åæ¥ç›´æŽ¥å¼•ç”¨å±žæ€§ï¼š "
#. Tag: para
#, no-c-format
msgid "If there is an alias, use a qualified property name:"
msgstr "如果指派了别å,需è¦ä½¿ç”¨å®Œæ•´çš„属性å:"
#. Tag: para
#, no-c-format
msgid "This returns instances of <literal>Cat named 'Fritz'."
msgstr "返回å为(属性 name ç‰äºŽï¼‰'Fritz' çš„ <literal>Cat 类的实例。 "
#. Tag: para
#, no-c-format
msgid "The following query:"
msgstr "下é¢çš„查询:"
#. Tag: para
#, no-c-format
msgid "returns all instances of <literal>Foo with an instance of bar with a date property equal to the startDate property of the Foo. Compound path expressions make the where clause extremely powerful. Consider the following:"
msgstr "将返回所有满足下é¢æ¡ä»¶çš„ <literal>Foo 类的实例: å˜åœ¨å¦‚下的 bar 的一个实例,其 date 属性ç‰äºŽ Foo çš„ startDate 属性。å¤åˆè·¯å¾„表达å¼ä½¿å¾— where åå¥éžå¸¸çš„强大,考虑如下情况: "
#. Tag: para
#, no-c-format
msgid "This query translates to an SQL query with a table (inner) join. For example:"
msgstr "该查询将被翻译æˆä¸ºä¸€ä¸ªå«æœ‰è¡¨è¿žæŽ¥ï¼ˆå†…连接)的 SQL æŸ¥è¯¢ã€‚å¦‚æžœä½ æ‰“ç®—å†™åƒè¿™æ ·çš„查询è¯å¥ï¼š"
#. Tag: para
#, no-c-format
msgid "would result in a query that would require four table joins in SQL."
msgstr "在 SQL ä¸ï¼Œä½ 为达æ¤ç›®çš„将需è¦è¿›è¡Œä¸€ä¸ªå››è¡¨è¿žæŽ¥çš„查询。 "
#. Tag: para
#, no-c-format
msgid "The <literal>= operator can be used to compare not only properties, but also instances:"
msgstr "<literal>= è¿ç®—符ä¸ä»…å¯ä»¥è¢«ç”¨æ¥æ¯”较属性的值,也å¯ä»¥ç”¨æ¥æ¯”较实例: "
#. Tag: para
#, no-c-format
msgid "The special property (lowercase) <literal>id can be used to reference the unique identifier of an object. See for more information."
msgstr "特殊属性(å°å†™ï¼‰<literal>id å¯ä»¥ç”¨æ¥è¡¨ç¤ºä¸€ä¸ªå¯¹è±¡çš„å”¯ä¸€çš„æ ‡è¯†ç¬¦ã€‚è¯¦æƒ…è¯·å‚考 。 "
#. Tag: para
#, no-c-format
msgid "The second query is efficient and does not require a table join."
msgstr "第二个查询是有效的。æ¤æ—¶ä¸éœ€è¦è¿›è¡Œè¡¨è¿žæŽ¥ã€‚"
#. Tag: para
#, no-c-format
msgid "Properties of composite identifiers can also be used. Consider the following example where <literal>Person has composite identifiers consisting of country and medicareNumber:"
msgstr "åŒæ ·ä¹Ÿå¯ä»¥ä½¿ç”¨å¤åˆæ ‡è¯†ç¬¦ã€‚比如 <literal>Person 类有一个å¤åˆæ ‡è¯†ç¬¦ï¼Œå®ƒç”± country 属性与 medicareNumber 属性组æˆï¼š"
#. Tag: para
#, no-c-format
msgid "Once again, the second query does not require a table join."
msgstr "第二个查询也ä¸éœ€è¦è¿›è¡Œè¡¨è¿žæŽ¥ã€‚ "
#. Tag: para
#, no-c-format
msgid "See <xref linkend=\"queryhql-identifier-property\" /> for more information regarding referencing identifier properties)"
msgstr "å…³äºŽå¼•ç”¨æ ‡è¯†ç¬¦å±žæ€§çš„æ›´å¤šä¿¡æ¯ï¼Œè¯·å‚考 <xref linkend=\"queryhql-identifier-property\" />。 "
#. Tag: para
#, no-c-format
msgid "The special property <literal>class accesses the discriminator value of an instance in the case of polymorphic persistence. A Java class name embedded in the where clause will be translated to its discriminator value."
msgstr "åŒæ ·çš„,特殊属性 <literal>class 在进行多æ€æŒä¹…化的情况下被用æ¥å˜å–一个实例的鉴别值(discriminator value)。一个嵌入到 where åå¥ä¸çš„ Java 类的åå—将被转æ¢ä¸ºè¯¥ç±»çš„鉴别值。 "
#. Tag: para
#, no-c-format
msgid "You can also use components or composite user types, or properties of said component types. See <xref linkend=\"queryhql-components\" /> for more information."
msgstr "ä½ ä¹Ÿå¯ä»¥ä½¿ç”¨ç»„件或者å¤åˆç”¨æˆ·ç±»åž‹ï¼Œä»¥åŠç»„件类型的属性。详情请å‚考 <xref linkend=\"queryhql-components\" />。 "
#. Tag: para
#, no-c-format
msgid "An \"any\" type has the special properties <literal>id and class that allows you to express a join in the following way (where AuditLog.item is a property mapped with <any>):"
msgstr "一个“任æ„â€ç±»åž‹æœ‰ä¸¤ä¸ªç‰¹æ®Šçš„属性 <literal>id å’Œ class,æ¥å…许我们按照下é¢çš„æ–¹å¼è¡¨è¾¾ä¸€ä¸ªè¿žæŽ¥ï¼ˆAuditLog.item æ˜¯ä¸€ä¸ªå±žæ€§ï¼Œè¯¥å±žæ€§è¢«æ˜ å°„ä¸º <any>)。 "
#. Tag: para
#, no-c-format
msgid "The <literal>log.item.class and payment.class would refer to the values of completely different database columns in the above query."
msgstr "注æ„,在上é¢çš„查询与å¥ä¸ï¼Œ<literal>log.item.class å’Œ payment.class 将涉åŠåˆ°å®Œå…¨ä¸åŒçš„æ•°æ®åº“ä¸çš„列。"
#. Tag: title
#, no-c-format
msgid "Expressions"
msgstr "表达å¼"
#. Tag: para
#, no-c-format
msgid "Expressions used in the <literal>where clause include the following:"
msgstr "在 <literal>where åå¥ä¸å…许使用的表达å¼åŒ…括 å¤§å¤šæ•°ä½ å¯ä»¥åœ¨ SQL 使用的表达å¼ç§ç±»ï¼š "
#. Tag: para
#, no-c-format
msgid "mathematical operators: <literal>+, -, *, /"
msgstr "æ•°å¦è¿ç®—符 <literal>+,-,*,/ "
#. Tag: para
#, no-c-format
msgid "binary comparison operators: <literal>=, >=, <=, <>, !=, like"
msgstr "二进制比较è¿ç®—符 <literal>=, >=, <=, <>, !=, like "
#. Tag: para
#, no-c-format
msgid "logical operations <literal>and, or, not"
msgstr "逻辑è¿ç®—符 <literal>and,or,not"
#. Tag: para
#, no-c-format
msgid "Parentheses <literal>( ) that indicates grouping"
msgstr "æ‹¬å· <literal>( ),表示分组 "
#. Tag: para
#, no-c-format
msgid "<literal>in, not in, between, is null, is not null, is empty, is not empty, member of and not member of"
msgstr "<literal>in, not in, between, is null, is not null, is empty, is not empty, member of and not member of"
#. Tag: para
#, no-c-format
msgid "\"Simple\" case, <literal>case ... when ... then ... else ... end, and \"searched\" case, case when ... then ... else ... end"
msgstr "\"Simple\" case, <literal>case ... when ... then ... else ... end, and \"searched\" case, case when ... then ... else ... end"
#. Tag: para
#, no-c-format
msgid "string concatenation <literal>...||... or concat(...,...)"
msgstr "å—符串连接符 <literal>...||... or concat(...,...)"
#. Tag: para
#, no-c-format
msgid "<literal>current_date(), current_time(), and current_timestamp()"
msgstr "<literal>current_date(), current_time(), and current_timestamp()"
#. Tag: para
#, no-c-format
msgid "<literal>second(...), minute(...), hour(...), day(...), month(...), and year(...)"
msgstr "<literal>second(...)ã€minute(...)ã€hour(...)ã€day(...)ã€month(...) å’Œ year(...)"
#. Tag: para
#, no-c-format
msgid "Any function or operator defined by EJB-QL 3.0: <literal>substring(), trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()"
msgstr "EJB-QL 3.0 定义的任何功能或æ“作符:<literal>substring(), trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()"
#. Tag: para
#, no-c-format
msgid "<literal>coalesce() and nullif()"
msgstr "<literal>coalesce() 和 nullif()"
#. Tag: para
#, no-c-format
msgid "<literal>str() for converting numeric or temporal values to a readable string"
msgstr "<literal>str() 把数å—或者时间值转æ¢ä¸ºå¯è¯»çš„å—符串"
#. Tag: para
#, no-c-format
msgid "<literal>cast(... as ...), where the second argument is the name of a Hibernate type, and extract(... from ...) if ANSI cast() and extract() is supported by the underlying database"
msgstr "<literal>cast(... as ...),其第二个å‚æ•°æ˜¯æŸ Hibernate 类型的åå—ï¼Œä»¥åŠ extract(... from ...),åªè¦ ANSI cast() å’Œ extract() 被底层数æ®åº“支æŒ"
#. Tag: para
#, no-c-format
msgid "the HQL <literal>index() function, that applies to aliases of a joined indexed collection"
msgstr "HQL <literal>index() 函数,作用于 join 的有åºé›†åˆçš„别å。"
#. Tag: para
#, no-c-format
msgid "HQL functions that take collection-valued path expressions: <literal>size(), minelement(), maxelement(), minindex(), maxindex(), along with the special elements() and indices functions that can be quantified using some, all, exists, any, in."
msgstr "HQL 函数,把集åˆä½œä¸ºå‚数:<literal>size(), minelement(), maxelement(), minindex(), maxindex(),还有特别的 elements() å’Œ indices 函数,å¯ä»¥ä¸Žæ•°é‡è¯åŠ 以é™å®šï¼šsome, all, exists, any, in。 "
#. Tag: para
#, no-c-format
msgid "Any database-supported SQL scalar function like <literal>sign(), trunc(), rtrim(), and sin()"
msgstr "任何数æ®åº“支æŒçš„ SQL æ ‡é‡å‡½æ•°ï¼Œæ¯”如 <literal>sign(), trunc(), rtrim(), sin() "
#. Tag: para
#, no-c-format
msgid "JDBC-style positional parameters <literal>?"
msgstr "JDBC é£Žæ ¼çš„å‚æ•°ä¼ å…¥ <literal>?"
#. Tag: para
#, no-c-format
msgid "named parameters <literal>:name, :start_date, and :x1"
msgstr "命åå‚æ•° <literal>:name,:start_date,:x1 "
#. Tag: para
#, no-c-format
msgid "SQL literals <literal>'foo', 69, 6.66E+2, '1970-01-01 10:00:01.0'"
msgstr "SQL ç›´æŽ¥å¸¸é‡ <literal>'foo', 69, 6.66E+2, '1970-01-01 10:00:01.0'"
#. Tag: para
#, no-c-format
msgid "Java <literal>public static final constants eg.Color.TABBY"
msgstr "Java <literal>public static final ç±»åž‹çš„å¸¸é‡ eg.Color.TABBY"
#. Tag: para
#, no-c-format
msgid "<literal>in and between can be used as follows:"
msgstr "å…³é”®å— <literal>in 与 between å¯æŒ‰å¦‚下方法使用: "
#. Tag: para
#, no-c-format
msgid "The negated forms can be written as follows:"
msgstr "而且å¦å®šçš„æ ¼å¼ä¹Ÿå¯ä»¥å¦‚下书写: "
#. Tag: para
#, no-c-format
msgid "Similarly, <literal>is null and is not null can be used to test for null values."
msgstr "åŒæ ·ï¼Œåå¥ <literal>is null 与 is not null å¯ä»¥è¢«ç”¨æ¥æµ‹è¯•ç©ºå€¼ï¼ˆnull)。 "
#. Tag: para
#, no-c-format
msgid "Booleans can be easily used in expressions by declaring HQL query substitutions in Hibernate configuration:"
msgstr "在 Hibernate é…置文件ä¸å£°æ˜Ž HQL“查询替代(query substitutions)â€ä¹‹åŽï¼Œå¸ƒå°”表达å¼ï¼ˆBooleans)å¯ä»¥åœ¨å…¶ä»–表达å¼ä¸è½»æ¾çš„使用: "
#. Tag: para
#, no-c-format
msgid "This will replace the keywords <literal>true and false with the literals 1 and 0 in the translated SQL from this HQL:"
msgstr "系统将该 HQL 转æ¢ä¸º SQL è¯å¥æ—¶ï¼Œè¯¥è®¾ç½®è¡¨æ˜Žå°†ç”¨å—符 <literal>1 å’Œ 0 æ¥å–ä»£å…³é”®å— true å’Œ false:"
#. Tag: para
#, no-c-format
msgid "You can test the size of a collection with the special property <literal>size or the special size() function."
msgstr "ä½ å¯ä»¥ç”¨ç‰¹æ®Šå±žæ€§ <literal>size,或是特殊函数 size() 测试一个集åˆçš„大å°ã€‚ "
#. Tag: para
#, no-c-format
msgid "For indexed collections, you can refer to the minimum and maximum indices using <literal>minindex and maxindex functions. Similarly, you can refer to the minimum and maximum elements of a collection of basic type using the minelement and maxelement functions. For example:"
msgstr "对于索引了(有åºï¼‰çš„集åˆï¼Œä½ å¯ä»¥ä½¿ç”¨ <literal>minindex 与 maxindex 函数æ¥å¼•ç”¨åˆ°æœ€å°ä¸Žæœ€å¤§çš„索引åºæ•°ã€‚åŒç†ï¼Œä½ å¯ä»¥ä½¿ç”¨ minelement 与 maxelement 函数æ¥å¼•ç”¨åˆ°ä¸€ä¸ªåŸºæœ¬æ•°æ®ç±»åž‹çš„集åˆä¸æœ€å°ä¸Žæœ€å¤§çš„å…ƒç´ ã€‚ä¾‹å¦‚ï¼š"
#. Tag: para
#, no-c-format
msgid "The SQL functions <literal>any, some, all, exists, in are supported when passed the element or index set of a collection (elements and indices functions) or the result of a subquery (see below):"
msgstr "åœ¨ä¼ é€’ä¸€ä¸ªé›†åˆçš„ç´¢å¼•é›†æˆ–è€…æ˜¯å…ƒç´ é›†ï¼ˆ<literal>elements 与 indices å‡½æ•°ï¼‰æˆ–è€…ä¼ é€’ä¸€ä¸ªå查询的结果的时候,å¯ä»¥ä½¿ç”¨ SQL 函数 any, some,all, exists, in:"
#. Tag: para
#, no-c-format
msgid "Note that these constructs - <literal>size, elements, indices, minindex, maxindex, minelement, maxelement - can only be used in the where clause in Hibernate3."
msgstr "注æ„,在 Hibernate3 ä¸ï¼Œè¿™äº›ç»“æž„å˜é‡ — <literal>size,elements,indices,minindex,maxindex,minelement,maxelement — åªèƒ½åœ¨ where åå¥ä¸ä½¿ç”¨ã€‚ "
#. Tag: para
#, no-c-format
msgid "Elements of indexed collections (arrays, lists, and maps) can be referred to by index in a where clause only:"
msgstr "一个被索引过的(有åºçš„)集åˆçš„å…ƒç´ ï¼ˆarrays,lists,maps)å¯ä»¥åœ¨å…¶ä»–索引ä¸è¢«å¼•ç”¨ï¼ˆåªèƒ½åœ¨ where åå¥ä¸ï¼‰ï¼š "
#. Tag: para
#, no-c-format
msgid "The expression inside <literal>[] can even be an arithmetic expression:"
msgstr "在 <literal>[] ä¸çš„表达å¼ç”šè‡³å¯ä»¥æ˜¯ä¸€ä¸ªç®—数表达å¼ï¼š"
#. Tag: para
#, no-c-format
msgid "HQL also provides the built-in <literal>index() function for elements of a one-to-many association or collection of values."
msgstr "对于一个一对多的关è”(one-to-many association)或是值的集åˆä¸çš„å…ƒç´ ï¼ŒHQL 也æ供内建的 <literal>index() 函数。"
#. Tag: para
#, no-c-format
msgid "Scalar SQL functions supported by the underlying database can be used:"
msgstr "如果底层数æ®åº“支æŒæ ‡é‡çš„ SQL 函数,它们也å¯ä»¥è¢«ä½¿ç”¨ï¼š"
#. Tag: para
#, no-c-format
msgid "Consider how much longer and less readable the following query would be in SQL:"
msgstr "å¦‚æžœä½ è¿˜ä¸èƒ½å¯¹æ‰€æœ‰çš„这些深信ä¸ç–‘,想想下é¢çš„查询。如果使用 SQL,è¯å¥é•¿åº¦ä¼šå¢žé•¿å¤šå°‘,å¯è¯»æ€§ä¼šä¸‹é™å¤šå°‘: "
#. Tag: para
#, no-c-format
msgid "<emphasis>Hint: something like"
msgstr "<emphasis>æ示: 会åƒå¦‚下的è¯å¥"
#. Tag: title
#, no-c-format
msgid "The order by clause"
msgstr "order by åå¥"
#. Tag: para
#, no-c-format
msgid "The list returned by a query can be ordered by any property of a returned class or components:"
msgstr "查询返回的列表(list)å¯ä»¥æŒ‰ç…§ä¸€ä¸ªè¿”回的类或组件(components)ä¸çš„任何属性(property)进行排åºï¼š "
#. Tag: para
#, no-c-format
msgid "The optional <literal>asc or desc indicate ascending or descending order respectively."
msgstr "å¯é€‰çš„ <literal>asc 或 desc 关键å—指明了按照å‡åºæˆ–é™åºè¿›è¡ŒæŽ’åºã€‚"
#. Tag: title
#, no-c-format
msgid "The group by clause"
msgstr "group by åå¥"
#. Tag: para
#, no-c-format
msgid "A query that returns aggregate values can be grouped by any property of a returned class or components:"
msgstr "一个返回èšé›†å€¼ï¼ˆaggregate values)的查询å¯ä»¥æŒ‰ç…§ä¸€ä¸ªè¿”回的类或组件(components)ä¸çš„任何属性(property)进行分组: "
#. Tag: para
#, no-c-format
msgid "A <literal>having clause is also allowed."
msgstr "<literal>having åå¥åœ¨è¿™é‡Œä¹Ÿå…许使用。"
#. Tag: para
#, no-c-format
msgid "SQL functions and aggregate functions are allowed in the <literal>having and order by clauses if they are supported by the underlying database (i.e., not in MySQL)."
msgstr "如果底层的数æ®åº“支æŒçš„è¯ï¼ˆä¾‹å¦‚ä¸èƒ½åœ¨ MySQL ä¸ä½¿ç”¨ï¼‰ï¼ŒSQL 的一般函数与èšé›†å‡½æ•°ä¹Ÿå¯ä»¥å‡ºçŽ°åœ¨ <literal>having 与 order by åå¥ä¸ã€‚ "
#. Tag: para
#, no-c-format
msgid "Neither the <literal>group by clause nor the order by clause can contain arithmetic expressions. Hibernate also does not currently expand a grouped entity, so you cannot write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties explicitly."
msgstr "æ³¨æ„ <literal>group by åå¥ä¸Ž order by åå¥ä¸éƒ½ä¸èƒ½åŒ…å«ç®—术表达å¼ï¼ˆarithmetic expressions)。也è¦æ³¨æ„ Hibernate ç›®å‰ä¸ä¼šæ‰©å±• group çš„å®žä½“ï¼Œå› æ¤ä½ ä¸èƒ½å†™ group by catï¼Œé™¤éž cat 的所有属性都ä¸æ˜¯èšé›†çš„(non-aggregatedï¼‰ã€‚ä½ å¿…é¡»æ˜Žç¡®çš„åˆ—å‡ºæ‰€æœ‰çš„éžèšé›†å±žæ€§ã€‚ "
#. Tag: title
#, no-c-format
msgid "Subqueries"
msgstr "å查询"
#. Tag: para
#, no-c-format
msgid "For databases that support subselects, Hibernate supports subqueries within queries. A subquery must be surrounded by parentheses (often by an SQL aggregate function call). Even correlated subqueries (subqueries that refer to an alias in the outer query) are allowed."
msgstr "对于支æŒå查询的数æ®åº“,Hibernate 支æŒåœ¨æŸ¥è¯¢ä¸ä½¿ç”¨å查询。一个å查询必须被圆括å·åŒ…å›´èµ·æ¥ï¼ˆç»å¸¸æ˜¯ SQL èšé›†å‡½æ•°çš„圆括å·ï¼‰ã€‚甚至相互关è”çš„å查询(引用到外部查询ä¸çš„别åçš„å查询)也是å…许的。"
#. Tag: para
#, no-c-format
msgid "Note that HQL subqueries can occur only in the select or where clauses."
msgstr "注æ„,HQL 自查询åªå¯ä»¥åœ¨ select 或者 where åå¥ä¸å‡ºçŽ°ã€‚ "
#. Tag: para
#, no-c-format
msgid "Note that subqueries can also utilize <literal>row value constructor syntax. See for more information."
msgstr "注æ„å查询也å¯ä»¥åˆ©ç”¨ <literal>row value constructor è¯æ³•ã€‚请å‚考 æ¥èŽ·å¾—详情。"
#. Tag: title
#, no-c-format
msgid "HQL examples"
msgstr "HQL 示例 "
#. Tag: para
#, no-c-format
msgid "Hibernate queries can be quite powerful and complex. In fact, the power of the query language is one of Hibernate's main strengths. The following example queries are similar to queries that have been used on recent projects. Please note that most queries you will write will be much simpler than the following examples."
msgstr "Hibernate 查询å¯ä»¥éžå¸¸çš„强大与å¤æ‚。实际上,Hibernate 的一个主è¦å–点就是查询è¯å¥çš„å¨åŠ›ã€‚这里有一些例å,它们与我在最近的一个项目ä¸ä½¿ç”¨çš„查询éžå¸¸ç›¸ä¼¼ã€‚注æ„ä½ èƒ½ç”¨åˆ°çš„å¤§å¤šæ•°æŸ¥è¯¢æ¯”è¿™äº›è¦ç®€å•çš„多。"
#. Tag: para
#, no-c-format
msgid "The following query returns the order id, number of items, the given minimum total value and the total value of the order for all unpaid orders for a particular customer. The results are ordered by total value. In determining the prices, it uses the current catalog. The resulting SQL query, against the <literal>ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has four inner joins and an (uncorrelated) subselect."
msgstr "下é¢çš„查询对于æŸä¸ªç‰¹å®šçš„客户的所有未支付的账å•ï¼Œåœ¨ç»™å®šç»™æœ€å°æ€»ä»·å€¼çš„情况下,返回订å•çš„ id,æ¡ç›®çš„æ•°é‡å’Œæ€»ä»·å€¼ï¼Œè¿”回值按照总价值的结果进行排åºã€‚ä¸ºäº†å†³å®šä»·æ ¼ï¼ŒæŸ¥è¯¢ä½¿ç”¨äº†å½“å‰ç›®å½•ã€‚作为转æ¢ç»“果的 SQL 查询,使用了<literal>ORDER,ORDER_LINE,PRODUCT,CATALOG å’Œ PRICE 库表。"
#. Tag: para
#, no-c-format
msgid "What a monster! Actually, in real life, I'm not very keen on subqueries, so my query was really more like this:"
msgstr "这简直是一个怪物ï¼å®žé™…上,在现实生活ä¸ï¼Œæˆ‘并ä¸çƒè¡·äºŽå查询,所以我的查询è¯å¥çœ‹èµ·æ¥æ›´åƒè¿™ä¸ªï¼š"
#. Tag: para
#, no-c-format
msgid "The next query counts the number of payments in each status, excluding all payments in the <literal>AWAITING_APPROVAL status where the most recent status change was made by the current user. It translates to an SQL query with two inner joins and a correlated subselect against the PAYMENT, PAYMENT_STATUS and PAYMENT_STATUS_CHANGE tables."
msgstr "下é¢ä¸€ä¸ªæŸ¥è¯¢è®¡ç®—æ¯ä¸€ç§çŠ¶æ€ä¸‹çš„支付的数目,除去所有处于 <literal>AWAITING_APPROVAL 状æ€çš„æ”¯ä»˜ï¼Œå› ä¸ºåœ¨è¯¥çŠ¶æ€ä¸‹ 当å‰çš„用户作出了状æ€çš„最新改å˜ã€‚该查询被转æ¢æˆå«æœ‰ä¸¤ä¸ªå†…连接以åŠä¸€ä¸ªç›¸å…³è”çš„å选择的 SQL 查询,该查询使用了表 PAYMENT,PAYMENT_STATUS ä»¥åŠ PAYMENT_STATUS_CHANGE。"
#. Tag: para
#, no-c-format
msgid "If the <literal>statusChanges collection was mapped as a list, instead of a set, the query would have been much simpler to write."
msgstr "如果我把 <literal>statusChanges å®žä¾‹é›†æ˜ å°„ä¸ºä¸€ä¸ªåˆ—è¡¨ï¼ˆlist)而ä¸æ˜¯ä¸€ä¸ªé›†åˆï¼ˆset),书写查询è¯å¥å°†æ›´åŠ 简å•ã€‚ "
#. Tag: para
#, no-c-format
msgid "The next query uses the MS SQL Server <literal>isNull() function to return all the accounts and unpaid payments for the organization to which the current user belongs. It translates to an SQL query with three inner joins, an outer join and a subselect against the ACCOUNT, PAYMENT, PAYMENT_STATUS, ACCOUNT_TYPE, ORGANIZATION and ORG_USER tables."
msgstr "下é¢ä¸€ä¸ªæŸ¥è¯¢ä½¿ç”¨äº† MS SQL Server çš„ <literal>isNull() 函数用以返回当å‰ç”¨æˆ·æ‰€å±žç»„织的组织å¸å·åŠç»„织未支付的账。它被转æ¢æˆä¸€ä¸ªå¯¹è¡¨ ACCOUNT,PAYMENT,PAYMENT_STATUS,ACCOUNT_TYPE,ORGANIZATION ä»¥åŠ ORG_USER 进行的三个内连接,一个外连接和一个å选择的 SQL 查询。"
#. Tag: para
#, no-c-format
msgid "For some databases, we would need to do away with the (correlated) subselect."
msgstr "对于一些数æ®åº“,我们需è¦å¼ƒç”¨ï¼ˆç›¸å…³çš„)å选择。"
#. Tag: title
#, no-c-format
msgid "Bulk update and delete"
msgstr "批é‡çš„ UPDATE å’Œ DELETE"
#. Tag: para
#, no-c-format
msgid "HQL now supports <literal>update, delete and insert ... select ... statements. See for more information."
msgstr "HQL çŽ°åœ¨æ”¯æŒ <literal>update,delete å’Œ insert ... select ...è¯å¥ã€‚查阅 以获得更多信æ¯ã€‚ "
#. Tag: title
#, no-c-format
msgid "Tips & Tricks"
msgstr "å°æŠ€å·§ & å°çªé—¨"
#. Tag: para
#, no-c-format
msgid "You can count the number of query results without returning them:"
msgstr "ä½ å¯ä»¥ç»Ÿè®¡æŸ¥è¯¢ç»“果的数目而ä¸å¿…实际的返回他们: "
#. Tag: para
#, no-c-format
msgid "To order a result by the size of a collection, use the following query:"
msgstr "è‹¥æƒ³æ ¹æ®ä¸€ä¸ªé›†åˆçš„大å°æ¥è¿›è¡ŒæŽ’åºï¼Œå¯ä»¥ä½¿ç”¨å¦‚下的è¯å¥ï¼š"
#. Tag: para
#, no-c-format
msgid "If your database supports subselects, you can place a condition upon selection size in the where clause of your query:"
msgstr "å¦‚æžœä½ çš„æ•°æ®åº“支æŒåé€‰æ‹©ï¼Œä½ å¯ä»¥åœ¨ä½ 的查询的 where åå¥ä¸ä¸ºé€‰æ‹©çš„大å°ï¼ˆselection size)指定一个æ¡ä»¶ï¼š"
#. Tag: para
#, no-c-format
msgid "If your database does not support subselects, use the following query:"
msgstr "å¦‚æžœä½ çš„æ•°æ®åº“ä¸æ”¯æŒå选择è¯å¥ï¼Œä½¿ç”¨ä¸‹é¢çš„查询: "
#. Tag: para
#, no-c-format
msgid "As this solution cannot return a <literal>User with zero messages because of the inner join, the following form is also useful:"
msgstr "å› ä¸ºå†…è¿žæŽ¥ï¼ˆinner joinï¼‰çš„åŽŸå› ï¼Œè¿™ä¸ªè§£å†³æ–¹æ¡ˆä¸èƒ½è¿”回å«æœ‰é›¶ä¸ªä¿¡æ¯çš„ <literal>User 类的实例,所以这ç§æƒ…况下使用下é¢çš„æ ¼å¼å°†æ˜¯æœ‰å¸®åŠ©çš„: "
#. Tag: para
#, no-c-format
msgid "Properties of a JavaBean can be bound to named query parameters:"
msgstr "JavaBean 的属性å¯ä»¥è¢«ç»‘定到一个命å查询(named query)的å‚数上:"
#. Tag: para
#, no-c-format
msgid "Collections are pageable by using the <literal>Query interface with a filter:"
msgstr "é€šè¿‡å°†æŽ¥å£ <literal>Query 与一个过滤器(filter)一起使用,集åˆï¼ˆCollections)是å¯ä»¥åˆ†é¡µçš„:"
#. Tag: para
#, no-c-format
msgid "Collection elements can be ordered or grouped using a query filter:"
msgstr "通过使用查询过滤器(query filter)å¯ä»¥å°†é›†åˆï¼ˆCollectionï¼‰çš„å…ƒç´ åˆ†ç»„æˆ–æŽ’åºï¼š "
#. Tag: para
#, no-c-format
msgid "You can find the size of a collection without initializing it:"
msgstr "ä¸ç”¨é€šè¿‡åˆå§‹åŒ–ï¼Œä½ å°±å¯ä»¥çŸ¥é“一个集åˆï¼ˆCollection)的大å°ï¼š"
#. Tag: title
#, no-c-format
msgid "Components"
msgstr "组件"
#. Tag: para
#, no-c-format
msgid "Components can be used similarly to the simple value types that are used in HQL queries. They can appear in the <literal>select clause as follows:"
msgstr "在 HQL 查询里,组件å¯ä»¥å’Œç®€å•å€¼ç±»åž‹ä¸€æ ·ä½¿ç”¨ã€‚它们å¯ä»¥å‡ºçŽ°åœ¨ <literal>select åå¥é‡Œï¼š "
#. Tag: para
#, no-c-format
msgid "where the Person's name property is a component. Components can also be used in the <literal>where clause:"
msgstr "在这里,Person çš„ name 属性是一个组件。组件也å¯ä»¥ç”¨åœ¨ <literal>where åå¥é‡Œï¼š"
#. Tag: para
#, no-c-format
msgid "Components can also be used in the <literal>order by clause:"
msgstr "组件也å¯ä»¥ç”¨åœ¨ <literal>order by åå¥é‡Œï¼š"
#. Tag: para
#, no-c-format
msgid "Another common use of components is in <link linkend=\"queryhql-tuple\">row value constructors."
msgstr "组件的å¦å¤–一个常è§ç”¨æ³•æ˜¯åœ¨ <xref linkend=\"queryhql-tuple\" /> 行值(row valueï¼‰æž„é€ å‡½æ•°é‡Œã€‚ "
#. Tag: title
#, no-c-format
msgid "Row value constructor syntax"
msgstr "Row value æž„é€ å‡½æ•°è¯æ³•"
#. Tag: para
#, no-c-format
msgid "HQL supports the use of ANSI SQL <literal>row value constructor syntax, sometimes referred to AS tuple syntax, even though the underlying database may not support that notion. Here, we are generally referring to multi-valued comparisons, typically associated with components. Consider an entity Person which defines a name component:"
msgstr "HQL æ”¯æŒ ANSI SQL <literal>row value constructor è¯æ³•ï¼ˆæœ‰æ—¶ä¹Ÿå«ä½œ tuple è¯æ³•ï¼‰ï¼Œå³ä½¿åº•å±‚æ•°æ®åº“å¯èƒ½ä¸æ”¯æŒè¿™ä¸ªæ¦‚念。在这里我们通常指的是多值(multi-valued)的比较,典型地是和组件相关è”。æ¥çœ‹çœ‹ä¸€ä¸ªå®šä¹‰äº† name 组件的实体 Person:"
#. Tag: para
#, no-c-format
msgid "That is valid syntax although it is a little verbose. You can make this more concise by using <literal>row value constructor syntax:"
msgstr "那是有效的è¯æ³•ï¼Œè™½ç„¶æœ‰ç‚¹å†—长。我们å¯ä»¥ä½¿å®ƒæ›´åŠ 简æ´ä¸€ç‚¹ï¼Œå¹¶ä½¿ç”¨ <literal>row value constructor è¯æ³•ï¼š "
#. Tag: para
#, no-c-format
msgid "It can also be useful to specify this in the <literal>select clause:"
msgstr "在 <literal>select åå¥é‡ŒæŒ‡å®šè¿™ä¸ªä¹Ÿæ˜¯å¾ˆæœ‰ç”¨çš„:"
#. Tag: para
#, no-c-format
msgid "Using <literal>row value constructor syntax can also be beneficial when using subqueries that need to compare against multiple values:"
msgstr "当使用需è¦æ¯”较多个值的å查询时,采用 <literal>row value constructor è¯æ³•ä¹Ÿå¾ˆæœ‰ç”¨å¤„: "
#. Tag: para
#, no-c-format
msgid "One thing to consider when deciding if you want to use this syntax, is that the query will be dependent upon the ordering of the component sub-properties in the metadata."
msgstr "决定是å¦ä½¿ç”¨è¿™ä¸ªè¯æ³•çš„ä¸€ä»¶å› ç´ å°±æ˜¯ï¼šè¿™ä¸ªæŸ¥è¯¢å°†ä¾èµ–于元数æ®é‡Œçš„组件å属性(sub-properties)的顺åºã€‚ "
#, fuzzy
#~ msgid "<![CDATA[from eg.Cat]]>"
#~ msgstr "from eg.Cat"
#, fuzzy
#~ msgid "<![CDATA[from Cat]]>"
#~ msgstr "from eg.Cat"
#, fuzzy
#~ msgid "<![CDATA[from Cat as cat]]>"
#~ msgstr "from Cat as cat"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat]]>"
#~ msgstr "from Cat cat"
#, fuzzy
#~ msgid "<![CDATA[from Formula, Parameter]]>"
#~ msgstr "from Formula, Parameter"
#, fuzzy
#~ msgid "<![CDATA[from Formula as form, Parameter as param]]>"
#~ msgstr "from Formula as form, Parameter as param"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat\n"
#~ " inner join cat.mate as mate\n"
#~ " left outer join cat.kittens as kitten]]>"
#~ msgstr ""
#~ "from Cat as cat\n"
#~ " inner join cat.mate as mate\n"
#~ " left outer join cat.kittens as kitten"
#, fuzzy
#~ msgid "<![CDATA[from Cat as cat left join cat.mate.kittens as kittens]]>"
#~ msgstr "from Cat as cat left join cat.mate.kittens as kittens"
#, fuzzy
#~ msgid "<![CDATA[from Formula form full join form.parameter param]]>"
#~ msgstr "from Formula form full join form.parameter param"
#~ msgid "inner join"
#~ msgstr "<literal>inner join(内连接)"
#~ msgid "left outer join"
#~ msgstr "<literal>left outer join(左外连接)"
#, fuzzy
#~ msgid "right outer join"
#~ msgstr "<literal>left outer join(左外连接)"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat\n"
#~ " join cat.mate as mate\n"
#~ " left join cat.kittens as kitten]]>"
#~ msgstr ""
#~ "from Cat as cat\n"
#~ " join cat.mate as mate\n"
#~ " left join cat.kittens as kitten"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat\n"
#~ " left join cat.kittens as kitten\n"
#~ " with kitten.bodyWeight > 10.0]]>"
#~ msgstr ""
#~ "from Cat as cat\n"
#~ " left join cat.kittens as kitten\n"
#~ " with kitten.bodyWeight > 10.0"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat\n"
#~ " inner join fetch cat.mate\n"
#~ " left join fetch cat.kittens]]>"
#~ msgstr ""
#~ "from Cat as cat\n"
#~ " inner join fetch cat.mate\n"
#~ " left join fetch cat.kittens"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat\n"
#~ " inner join fetch cat.mate\n"
#~ " left join fetch cat.kittens child\n"
#~ " left join fetch child.kittens]]>"
#~ msgstr ""
#~ "from Cat as cat\n"
#~ " inner join fetch cat.mate\n"
#~ " left join fetch cat.kittens child\n"
#~ " left join fetch child.kittens"
#, fuzzy
#~ msgid "<![CDATA[from Document fetch all properties order by name]]>"
#~ msgstr "from Document fetch all properties order by name"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Document doc fetch all properties where lower(doc.name) "
#~ "like '%cats%']]>"
#~ msgstr ""
#~ "from Document doc fetch all properties where lower(doc.name) like '%"
#~ "cats%'"
#, fuzzy
#~ msgid "<![CDATA[from Cat as cat where cat.mate.name like '%s%']]>"
#~ msgstr "from Cat as cat where cat.mate.name like '%s%'"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select mate\n"
#~ "from Cat as cat\n"
#~ " inner join cat.mate as mate]]>"
#~ msgstr ""
#~ "select mate\n"
#~ "from Cat as cat\n"
#~ " inner join cat.mate as mate"
#, fuzzy
#~ msgid "<![CDATA[select cat.mate from Cat cat]]>"
#~ msgstr "select cat.mate from Cat cat"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cat.name from DomesticCat cat\n"
#~ "where cat.name like 'fri%']]>"
#~ msgstr ""
#~ "select cat.name from DomesticCat cat\n"
#~ "where cat.name like 'fri%'"
#, fuzzy
#~ msgid "<![CDATA[select cust.name.firstName from Customer as cust]]>"
#~ msgstr "select cust.name.firstName from Customer as cust"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select mother, offspr, mate.name\n"
#~ "from DomesticCat as mother\n"
#~ " inner join mother.mate as mate\n"
#~ " left outer join mother.kittens as offspr]]>"
#~ msgstr ""
#~ "select mother, offspr, mate.name\n"
#~ "from DomesticCat as mother\n"
#~ " inner join mother.mate as mate\n"
#~ " left outer join mother.kittens as offspr"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select new list(mother, offspr, mate.name)\n"
#~ "from DomesticCat as mother\n"
#~ " inner join mother.mate as mate\n"
#~ " left outer join mother.kittens as offspr]]>"
#~ msgstr ""
#~ "select new list(mother, offspr, mate.name)\n"
#~ "from DomesticCat as mother\n"
#~ " inner join mother.mate as mate\n"
#~ " left outer join mother.kittens as offspr"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select new Family(mother, mate, offspr)\n"
#~ "from DomesticCat as mother\n"
#~ " join mother.mate as mate\n"
#~ " left join mother.kittens as offspr]]>"
#~ msgstr ""
#~ "select new Family(mother, mate, offspr)\n"
#~ "from DomesticCat as mother\n"
#~ " join mother.mate as mate\n"
#~ " left join mother.kittens as offspr"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select max(bodyWeight) as max, min(bodyWeight) as min, count(*) "
#~ "as n\n"
#~ "from Cat cat]]>"
#~ msgstr ""
#~ "select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n\n"
#~ "from Cat cat"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select new map( max(bodyWeight) as max, min(bodyWeight) as min, "
#~ "count(*) as n )\n"
#~ "from Cat cat]]>"
#~ msgstr ""
#~ "select new map( max(bodyWeight) as max, min(bodyWeight) as min, count(*) "
#~ "as n )\n"
#~ "from Cat cat"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select avg(cat.weight), sum(cat.weight), max(cat.weight), count"
#~ "(cat)\n"
#~ "from Cat cat]]>"
#~ msgstr ""
#~ "select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat)\n"
#~ "from Cat cat"
#~ msgid "count(*)"
#~ msgstr "count(*)"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cat.weight + sum(kitten.weight)\n"
#~ "from Cat cat\n"
#~ " join cat.kittens kitten\n"
#~ "group by cat.id, cat.weight]]>"
#~ msgstr ""
#~ "select cat.weight + sum(kitten.weight)\n"
#~ "from Cat cat\n"
#~ " join cat.kittens kitten\n"
#~ "group by cat.id, cat.weight"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select firstName||' '||initial||' '||upper(lastName) from "
#~ "Person]]>"
#~ msgstr "select firstName||' '||initial||' '||upper(lastName) from Person"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select distinct cat.name from Cat cat\n"
#~ "\n"
#~ "select count(distinct cat.name), count(cat) from Cat cat]]>"
#~ msgstr ""
#~ "select distinct cat.name from Cat cat\n"
#~ "\n"
#~ "select count(distinct cat.name), count(cat) from Cat cat"
#, fuzzy
#~ msgid "<![CDATA[from java.lang.Object o]]>"
#~ msgstr "from java.lang.Object o"
#, fuzzy
#~ msgid "<![CDATA[from Named n, Named m where n.name = m.name]]>"
#~ msgstr "from Named n, Named m where n.name = m.name"
#, fuzzy
#~ msgid "<![CDATA[from Cat where name='Fritz']]>"
#~ msgstr "from Cat where name='Fritz'"
#, fuzzy
#~ msgid "<![CDATA[from Cat as cat where cat.name='Fritz']]>"
#~ msgstr "from Cat as cat where cat.name='Fritz'"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select foo\n"
#~ "from Foo foo, Bar bar\n"
#~ "where foo.startDate = bar.date]]>"
#~ msgstr ""
#~ "select foo\n"
#~ "from Foo foo, Bar bar\n"
#~ "where foo.startDate = bar.date"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat where cat.mate.name is not null]]>"
#~ msgstr "from Cat cat where cat.mate.name is not null"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Foo foo\n"
#~ "where foo.bar.baz.customer.address.city is not null]]>"
#~ msgstr ""
#~ "from Foo foo\n"
#~ "where foo.bar.baz.customer.address.city is not null"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat, Cat rival where cat.mate = rival.mate]]>"
#~ msgstr "from Cat cat, Cat rival where cat.mate = rival.mate"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cat, mate\n"
#~ "from Cat cat, Cat mate\n"
#~ "where cat.mate = mate]]>"
#~ msgstr ""
#~ "select cat, mate\n"
#~ "from Cat cat, Cat mate\n"
#~ "where cat.mate = mate"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat where cat.id = 123\n"
#~ "\n"
#~ "from Cat as cat where cat.mate.id = 69]]>"
#~ msgstr ""
#~ "from Cat as cat where cat.id = 123\n"
#~ "\n"
#~ "from Cat as cat where cat.mate.id = 69"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from bank.Person person\n"
#~ "where person.id.country = 'AU'\n"
#~ " and person.id.medicareNumber = 123456]]>"
#~ msgstr ""
#~ "from bank.Person person\n"
#~ "where person.id.country = 'AU'\n"
#~ " and person.id.medicareNumber = 123456"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from bank.Account account\n"
#~ "where account.owner.id.country = 'AU'\n"
#~ " and account.owner.id.medicareNumber = 123456]]>"
#~ msgstr ""
#~ "from bank.Account account\n"
#~ "where account.owner.id.country = 'AU'\n"
#~ " and account.owner.id.medicareNumber = 123456"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat where cat.class = DomesticCat]]>"
#~ msgstr "from Cat cat where cat.class = DomesticCat"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from AuditLog log, Payment payment\n"
#~ "where log.item.class = 'Payment' and log.item.id = payment.id]]>"
#~ msgstr ""
#~ "from AuditLog log, Payment payment\n"
#~ "where log.item.class = 'Payment' and log.item.id = payment.id"
#, fuzzy
#~ msgid "<![CDATA[from DomesticCat cat where cat.name between 'A' and 'B']]>"
#~ msgstr "from DomesticCat cat where cat.name between 'A' and 'B'"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )]]>"
#~ msgstr "from DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from DomesticCat cat where cat.name not between 'A' and 'B']]>"
#~ msgstr "from DomesticCat cat where cat.name not between 'A' and 'B'"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from DomesticCat cat where cat.name not in ( 'Foo', 'Bar', "
#~ "'Baz' )]]>"
#~ msgstr "from DomesticCat cat where cat.name not in ( 'Foo', 'Bar', 'Baz' )"
#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<property name=\"hibernate.query.substitutions\">true 1, false "
#~ "0</property>"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat where cat.alive = true]]>"
#~ msgstr "from Cat cat where cat.alive = true"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat where cat.kittens.size > 0]]>"
#~ msgstr "from Cat cat where cat.kittens.size > 0"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat where size(cat.kittens) > 0]]>"
#~ msgstr "from Cat cat where size(cat.kittens) > 0"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Calendar cal where maxelement(cal.holidays) > current_date]]"
#~ ">"
#~ msgstr "from Calendar cal where maxelement(cal.holidays) > current_date"
#, fuzzy
#~ msgid "<![CDATA[from Order order where maxindex(order.items) > 100]]>"
#~ msgstr "from Order order where maxindex(order.items) > 100"
#, fuzzy
#~ msgid "<![CDATA[from Order order where minelement(order.items) > 10000]]>"
#~ msgstr "from Order order where minelement(order.items) > 10000"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select mother from Cat as mother, Cat as kit\n"
#~ "where kit in elements(foo.kittens)]]>"
#~ msgstr ""
#~ "select mother from Cat as mother, Cat as kit\n"
#~ "where kit in elements(foo.kittens)"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select p from NameList list, Person p\n"
#~ "where p.name = some elements(list.names)]]>"
#~ msgstr ""
#~ "select p from NameList list, Person p\n"
#~ "where p.name = some elements(list.names)"
#, fuzzy
#~ msgid "<![CDATA[from Cat cat where exists elements(cat.kittens)]]>"
#~ msgstr "from Cat cat where exists elements(cat.kittens)"
#, fuzzy
#~ msgid "<![CDATA[from Player p where 3 > all elements(p.scores)]]>"
#~ msgstr "from Player p where 3 > all elements(p.scores)"
#, fuzzy
#~ msgid "<![CDATA[from Show show where 'fizard' in indices(show.acts)]]>"
#~ msgstr "from Show show where 'fizard' in indices(show.acts)"
#, fuzzy
#~ msgid "<![CDATA[from Order order where order.items[0].id = 1234]]>"
#~ msgstr "from Order order where order.items[0].id = 1234"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select person from Person person, Calendar calendar\n"
#~ "where calendar.holidays['national day'] = person.birthDay\n"
#~ " and person.nationality.calendar = calendar]]>"
#~ msgstr ""
#~ "select person from Person person, Calendar calendar\n"
#~ "where calendar.holidays['national day'] = person.birthDay\n"
#~ " and person.nationality.calendar = calendar"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select item from Item item, Order order\n"
#~ "where order.items[ order.deliveredItemIndices[0] ] = item and order.id = "
#~ "11]]>"
#~ msgstr ""
#~ "select item from Item item, Order order\n"
#~ "where order.items[ order.deliveredItemIndices[0] ] = item and order.id = "
#~ "11"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select item from Item item, Order order\n"
#~ "where order.items[ maxindex(order.items) ] = item and order.id = 11]]>"
#~ msgstr ""
#~ "select item from Item item, Order order\n"
#~ "where order.items[ maxindex(order.items) ] = item and order.id = 11"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select item from Item item, Order order\n"
#~ "where order.items[ size(order.items) - 1 ] = item]]>"
#~ msgstr ""
#~ "select item from Item item, Order order\n"
#~ "where order.items[ size(order.items) - 1 ] = item"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select item, index(item) from Order order\n"
#~ " join order.items item\n"
#~ "where index(item) < 5]]>"
#~ msgstr ""
#~ "select item, index(item) from Order order\n"
#~ " join order.items item\n"
#~ "where index(item) < 5"
#, fuzzy
#~ msgid "<![CDATA[from DomesticCat cat where upper(cat.name) like 'FRI%']]>"
#~ msgstr "from DomesticCat cat where upper(cat.name) like 'FRI%'"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cust\n"
#~ "from Product prod,\n"
#~ " Store store\n"
#~ " inner join store.customers cust\n"
#~ "where prod.name = 'widget'\n"
#~ " and store.location.name in ( 'Melbourne', 'Sydney' )\n"
#~ " and prod = all elements(cust.currentOrder.lineItems)]]>"
#~ msgstr ""
#~ "select cust\n"
#~ "from Product prod,\n"
#~ " Store store\n"
#~ " inner join store.customers cust\n"
#~ "where prod.name = 'widget'\n"
#~ " and store.location.name in ( 'Melbourne', 'Sydney' )\n"
#~ " and prod = all elements(cust.currentOrder.lineItems)"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[SELECT cust.name, cust.address, cust.phone, cust.id, cust."
#~ "current_order\n"
#~ "FROM customers cust,\n"
#~ " stores store,\n"
#~ " locations loc,\n"
#~ " store_customers sc,\n"
#~ " product prod\n"
#~ "WHERE prod.name = 'widget'\n"
#~ " AND store.loc_id = loc.id\n"
#~ " AND loc.name IN ( 'Melbourne', 'Sydney' )\n"
#~ " AND sc.store_id = store.id\n"
#~ " AND sc.cust_id = cust.id\n"
#~ " AND prod.id = ALL(\n"
#~ " SELECT item.prod_id\n"
#~ " FROM line_items item, orders o\n"
#~ " WHERE item.order_id = o.id\n"
#~ " AND cust.current_order = o.id\n"
#~ " )]]>"
#~ msgstr ""
#~ "SELECT cust.name, cust.address, cust.phone, cust.id, cust.current_order\n"
#~ "FROM customers cust,\n"
#~ " stores store,\n"
#~ " locations loc,\n"
#~ " store_customers sc,\n"
#~ " product prod\n"
#~ "WHERE prod.name = 'widget'\n"
#~ " AND store.loc_id = loc.id\n"
#~ " AND loc.name IN ( 'Melbourne', 'Sydney' )\n"
#~ " AND sc.store_id = store.id\n"
#~ " AND sc.cust_id = cust.id\n"
#~ " AND prod.id = ALL(\n"
#~ " SELECT item.prod_id\n"
#~ " FROM line_items item, orders o\n"
#~ " WHERE item.order_id = o.id\n"
#~ " AND cust.current_order = o.id\n"
#~ " )"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from DomesticCat cat\n"
#~ "order by cat.name asc, cat.weight desc, cat.birthdate]]>"
#~ msgstr ""
#~ "from DomesticCat cat\n"
#~ "order by cat.name asc, cat.weight desc, cat.birthdate"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
#~ "from Cat cat\n"
#~ "group by cat.color]]>"
#~ msgstr ""
#~ "select cat.color, sum(cat.weight), count(cat)\n"
#~ "from Cat cat\n"
#~ "group by cat.color"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select foo.id, avg(name), max(name)\n"
#~ "from Foo foo join foo.names name\n"
#~ "group by foo.id]]>"
#~ msgstr ""
#~ "select foo.id, avg(name), max(name)\n"
#~ "from Foo foo join foo.names name\n"
#~ "group by foo.id"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cat.color, sum(cat.weight), count(cat)\n"
#~ "from Cat cat\n"
#~ "group by cat.color\n"
#~ "having cat.color in (eg.Color.TABBY, eg.Color.BLACK)]]>"
#~ msgstr ""
#~ "select cat.color, sum(cat.weight), count(cat)\n"
#~ "from Cat cat\n"
#~ "group by cat.color\n"
#~ "having cat.color in (eg.Color.TABBY, eg.Color.BLACK)"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cat\n"
#~ "from Cat cat\n"
#~ " join cat.kittens kitten\n"
#~ "group by cat.id, cat.name, cat.other, cat.properties\n"
#~ "having avg(kitten.weight) > 100\n"
#~ "order by count(kitten) asc, sum(kitten.weight) desc]]>"
#~ msgstr ""
#~ "select cat\n"
#~ "from Cat cat\n"
#~ " join cat.kittens kitten\n"
#~ "group by cat.id, cat.name, cat.other, cat.properties\n"
#~ "having avg(kitten.weight) > 100\n"
#~ "order by count(kitten) asc, sum(kitten.weight) desc"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as fatcat\n"
#~ "where fatcat.weight > (\n"
#~ " select avg(cat.weight) from DomesticCat cat\n"
#~ ")]]>"
#~ msgstr ""
#~ "from Cat as fatcat\n"
#~ "where fatcat.weight > (\n"
#~ " select avg(cat.weight) from DomesticCat cat\n"
#~ ")"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from DomesticCat as cat\n"
#~ "where cat.name = some (\n"
#~ " select name.nickName from Name as name\n"
#~ ")]]>"
#~ msgstr ""
#~ "from DomesticCat as cat\n"
#~ "where cat.name = some (\n"
#~ " select name.nickName from Name as name\n"
#~ ")"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat\n"
#~ "where not exists (\n"
#~ " from Cat as mate where mate.mate = cat\n"
#~ ")]]>"
#~ msgstr ""
#~ "from Cat as cat\n"
#~ "where not exists (\n"
#~ " from Cat as mate where mate.mate = cat\n"
#~ ")"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from DomesticCat as cat\n"
#~ "where cat.name not in (\n"
#~ " select name.nickName from Name as name\n"
#~ ")]]>"
#~ msgstr ""
#~ "from DomesticCat as cat\n"
#~ "where cat.name not in (\n"
#~ " select name.nickName from Name as name\n"
#~ ")"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select cat.id, (select max(kit.weight) from cat.kitten kit)\n"
#~ "from Cat as cat]]>"
#~ msgstr ""
#~ "select cat.id, (select max(kit.weight) from cat.kitten kit)\n"
#~ "from Cat as cat"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select order.id, sum(price.amount), count(item)\n"
#~ "from Order as order\n"
#~ " join order.lineItems as item\n"
#~ " join item.product as product,\n"
#~ " Catalog as catalog\n"
#~ " join catalog.prices as price\n"
#~ "where order.paid = false\n"
#~ " and order.customer = :customer\n"
#~ " and price.product = product\n"
#~ " and catalog.effectiveDate < sysdate\n"
#~ " and catalog.effectiveDate >= all (\n"
#~ " select cat.effectiveDate\n"
#~ " from Catalog as cat\n"
#~ " where cat.effectiveDate < sysdate\n"
#~ " )\n"
#~ "group by order\n"
#~ "having sum(price.amount) > :minAmount\n"
#~ "order by sum(price.amount) desc]]>"
#~ msgstr ""
#~ "select order.id, sum(price.amount), count(item)\n"
#~ "from Order as order\n"
#~ " join order.lineItems as item\n"
#~ " join item.product as product,\n"
#~ " Catalog as catalog\n"
#~ " join catalog.prices as price\n"
#~ "where order.paid = false\n"
#~ " and order.customer = :customer\n"
#~ " and price.product = product\n"
#~ " and catalog.effectiveDate < sysdate\n"
#~ " and catalog.effectiveDate >= all (\n"
#~ " select cat.effectiveDate\n"
#~ " from Catalog as cat\n"
#~ " where cat.effectiveDate < sysdate\n"
#~ " )\n"
#~ "group by order\n"
#~ "having sum(price.amount) > :minAmount\n"
#~ "order by sum(price.amount) desc"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select order.id, sum(price.amount), count(item)\n"
#~ "from Order as order\n"
#~ " join order.lineItems as item\n"
#~ " join item.product as product,\n"
#~ " Catalog as catalog\n"
#~ " join catalog.prices as price\n"
#~ "where order.paid = false\n"
#~ " and order.customer = :customer\n"
#~ " and price.product = product\n"
#~ " and catalog = :currentCatalog\n"
#~ "group by order\n"
#~ "having sum(price.amount) > :minAmount\n"
#~ "order by sum(price.amount) desc]]>"
#~ msgstr ""
#~ "select order.id, sum(price.amount), count(item)\n"
#~ "from Order as order\n"
#~ " join order.lineItems as item\n"
#~ " join item.product as product,\n"
#~ " Catalog as catalog\n"
#~ " join catalog.prices as price\n"
#~ "where order.paid = false\n"
#~ " and order.customer = :customer\n"
#~ " and price.product = product\n"
#~ " and catalog = :currentCatalog\n"
#~ "group by order\n"
#~ "having sum(price.amount) > :minAmount\n"
#~ "order by sum(price.amount) desc"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select count(payment), status.name\n"
#~ "from Payment as payment\n"
#~ " join payment.currentStatus as status\n"
#~ " join payment.statusChanges as statusChange\n"
#~ "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
#~ " or (\n"
#~ " statusChange.timeStamp = (\n"
#~ " select max(change.timeStamp)\n"
#~ " from PaymentStatusChange change\n"
#~ " where change.payment = payment\n"
#~ " )\n"
#~ " and statusChange.user <> :currentUser\n"
#~ " )\n"
#~ "group by status.name, status.sortOrder\n"
#~ "order by status.sortOrder]]>"
#~ msgstr ""
#~ "select count(payment), status.name\n"
#~ "from Payment as payment\n"
#~ " join payment.currentStatus as status\n"
#~ " join payment.statusChanges as statusChange\n"
#~ "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
#~ " or (\n"
#~ " statusChange.timeStamp = (\n"
#~ " select max(change.timeStamp)\n"
#~ " from PaymentStatusChange change\n"
#~ " where change.payment = payment\n"
#~ " )\n"
#~ " and statusChange.user <> :currentUser\n"
#~ " )\n"
#~ "group by status.name, status.sortOrder\n"
#~ "order by status.sortOrder"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select count(payment), status.name\n"
#~ "from Payment as payment\n"
#~ " join payment.currentStatus as status\n"
#~ "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
#~ " or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :"
#~ "currentUser\n"
#~ "group by status.name, status.sortOrder\n"
#~ "order by status.sortOrder]]>"
#~ msgstr ""
#~ "select count(payment), status.name\n"
#~ "from Payment as payment\n"
#~ " join payment.currentStatus as status\n"
#~ "where payment.status.name <> PaymentStatus.AWAITING_APPROVAL\n"
#~ " or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <"
#~ "> :currentUser\n"
#~ "group by status.name, status.sortOrder\n"
#~ "order by status.sortOrder"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select account, payment\n"
#~ "from Account as account\n"
#~ " left outer join account.payments as payment\n"
#~ "where :currentUser in elements(account.holder.users)\n"
#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
#~ "PaymentStatus.UNPAID)\n"
#~ "order by account.type.sortOrder, account.accountNumber, payment.dueDate]]>"
#~ msgstr ""
#~ "select account, payment\n"
#~ "from Account as account\n"
#~ " left outer join account.payments as payment\n"
#~ "where :currentUser in elements(account.holder.users)\n"
#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
#~ "PaymentStatus.UNPAID)\n"
#~ "order by account.type.sortOrder, account.accountNumber, payment.dueDate"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select account, payment\n"
#~ "from Account as account\n"
#~ " join account.holder.users as user\n"
#~ " left outer join account.payments as payment\n"
#~ "where :currentUser = user\n"
#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
#~ "PaymentStatus.UNPAID)\n"
#~ "order by account.type.sortOrder, account.accountNumber, payment.dueDate]]>"
#~ msgstr ""
#~ "select account, payment\n"
#~ "from Account as account\n"
#~ " join account.holder.users as user\n"
#~ " left outer join account.payments as payment\n"
#~ "where :currentUser = user\n"
#~ " and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, "
#~ "PaymentStatus.UNPAID)\n"
#~ "order by account.type.sortOrder, account.accountNumber, payment.dueDate"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[( (Integer) session.createQuery(\"select count(*) from ....\")."
#~ "iterate().next() ).intValue()]]>"
#~ msgstr ""
#~ "( (Integer) session.iterate(\"select count(*) from ....\").next() )."
#~ "intValue()"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select usr.id, usr.name\n"
#~ "from User as usr\n"
#~ " left join usr.messages as msg\n"
#~ "group by usr.id, usr.name\n"
#~ "order by count(msg)]]>"
#~ msgstr ""
#~ "select usr.id, usr.name\n"
#~ "from User as usr\n"
#~ " left join usr.messages as msg\n"
#~ "group by usr.id, usr.name\n"
#~ "order by count(msg)"
#, fuzzy
#~ msgid "<![CDATA[from User usr where size(usr.messages) >= 1]]>"
#~ msgstr "from User usr where size(usr.messages) >= 1"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select usr.id, usr.name\n"
#~ "from User usr.name\n"
#~ " join usr.messages msg\n"
#~ "group by usr.id, usr.name\n"
#~ "having count(msg) >= 1]]>"
#~ msgstr ""
#~ "select usr.id, usr.name\n"
#~ "from User usr.name\n"
#~ " join usr.messages msg\n"
#~ "group by usr.id, usr.name\n"
#~ "having count(msg) >= 1"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[select usr.id, usr.name\n"
#~ "from User as usr\n"
#~ " left join usr.messages as msg\n"
#~ "group by usr.id, usr.name\n"
#~ "having count(msg) = 0]]>"
#~ msgstr ""
#~ "select usr.id, usr.name\n"
#~ "from User as usr\n"
#~ " left join usr.messages as msg\n"
#~ "group by usr.id, usr.name\n"
#~ "having count(msg) = 0"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Query q = s.createQuery(\"from foo Foo as foo where foo.name=:"
#~ "name and foo.size=:size\");\n"
#~ "q.setProperties(fooBean); // fooBean has getName() and getSize()\n"
#~ "List foos = q.list();]]>"
#~ msgstr ""
#~ "Query q = s.createQuery(\"from foo Foo as foo where foo.name=:name and "
#~ "foo.size=:size\");\n"
#~ "q.setProperties(fooBean); // fooBean has getName() and getSize()\n"
#~ "List foos = q.list();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Query q = s.createFilter( collection, \"\" ); // the trivial "
#~ "filter\n"
#~ "q.setMaxResults(PAGE_SIZE);\n"
#~ "q.setFirstResult(PAGE_SIZE * pageNumber);\n"
#~ "List page = q.list();]]>"
#~ msgstr ""
#~ "Query q = s.createFilter( collection, \"\" ); // the trivial filter\n"
#~ "q.setMaxResults(PAGE_SIZE);\n"
#~ "q.setFirstResult(PAGE_SIZE * pageNumber);\n"
#~ "List page = q.list();"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[Collection orderedCollection = s.filter( collection, \"order by "
#~ "this.amount\" );\n"
#~ "Collection counts = s.filter( collection, \"select this.type, count(this) "
#~ "group by this.type\" );]]>"
#~ msgstr ""
#~ "Collection orderedCollection = s.filter( collection, \"order by this."
#~ "amount\" );\n"
#~ "Collection counts = s.filter( collection, \"select this.type, count(this) "
#~ "group by this.type\" );"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[( (Integer) session.createQuery(\"select count(*) from ....\")."
#~ "iterate().next() ).intValue();]]>"
#~ msgstr ""
#~ "( (Integer) session.iterate(\"select count(*) from ....\").next() )."
#~ "intValue();"
#, fuzzy
#~ msgid "<![CDATA[select p.name from Person p]]>"
#~ msgstr "select p.name from from Person p"
#, fuzzy
#~ msgid "<![CDATA[select p.name.first from Person p]]>"
#~ msgstr "select p.name.first from from Person p"
#, fuzzy
#~ msgid "<![CDATA[from Person p where p.name = :name]]>"
#~ msgstr "from from Person p where p.name = :name"
#, fuzzy
#~ msgid "<![CDATA[from Person p where p.name.first = :firstName]]>"
#~ msgstr "from from Person p where p.name.first = :firstName"
#, fuzzy
#~ msgid "<![CDATA[from Person p order by p.name]]>"
#~ msgstr "from from Person p order by p.name"
#, fuzzy
#~ msgid "<![CDATA[from Person p order by p.name.first]]>"
#~ msgstr "from from Person p order by p.name.first"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Person p where p.name.first='John' and p.name."
#~ "last='Jingleheimer-Schmidt']]>"
#~ msgstr ""
#~ "from Person p where p.name.first='John' and p.name.last='Jingleheimer-"
#~ "Schmidt'"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Person p where p.name=('John', 'Jingleheimer-Schmidt')]]>"
#~ msgstr "from Person p where p.name=('John', 'Jingleheimer-Schmidt')"
#, fuzzy
#~ msgid ""
#~ "<![CDATA[from Cat as cat\n"
#~ "where not ( cat.name, cat.color ) in (\n"
#~ " select cat.name, cat.color from DomesticCat cat\n"
#~ ")]]>"
#~ msgstr ""
#~ "from Cat as cat\n"
#~ "where not ( cat.name, cat.color ) in (\n"
#~ " select cat.name, cat.color from DomesticCat cat\n"
#~ ")"
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate query_hql.po source code file:
|