📄 query_hql.po
字号:
#, fuzzymsgid ""msgstr """PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Content-Type: text/plain; charset=utf-8\n"#: index.docbook:5msgid "HQL: The Hibernate Query Language"msgstr "HQL: El Lenguaje de Consulta de Hibernate"#: index.docbook:7msgid """Hibernate is equipped with an extremely powerful query language that (quite ""intentionally) looks very much like SQL. But don't be fooled by the syntax; ""HQL is fully object-oriented, understanding notions like inheritence, ""polymorphism and association."msgstr """Hibernate está equipado con un lenguaje de consulta extremadamente ""potente que (intencionalmente en absoluto) se parece muchísimo a SQL. ""Pero no te engañes por la sintaxis; HQL es completamente orientado a ""objetos, entendiendo nociones como herencia, polimorfismo y asociació""n."#: index.docbook:14msgid "Case Sensitivity"msgstr "Sensibilidad a Mayúsculas"#: index.docbook:16msgid """Queries are case-insensitive, except for names of Java classes and ""properties. So <literal>SeLeCT</literal> is the same as <literal>sELEct</""literal> is the same as <literal>SELECT</literal> but <literal>org.hibernate.""eg.FOO</literal> is not <literal>org.hibernate.eg.Foo</literal> and ""<literal>foo.barSet</literal> is not <literal>foo.BARSET</literal>."msgstr """Las consultas son insensibles a mayúsculas, excepto para nombres de ""clases Java y propiedades. De modo que <literal>SeLeCT</literal> es lo mismo ""que <literal>sELEct</literal> e igual a <literal>SELECT</literal>, pero ""<literal>org.hibernate.eg.FOO</literal> no lo es a <literal>org.hibernate.eg.""Foo</literal> y <literal>foo.barSet</literal> no es igual a <literal>foo.""BARSET</literal>."#: index.docbook:27msgid """This manual uses lowercase HQL keywords. Some users find queries with ""uppercase keywords more readable, but we find this convention ugly when ""embedded in Java code."msgstr """Este manual usa palabras clave HQL en minúsculas. Algunos usuarios ""encuentran las consultas con palabras clave en mayúsculas más ""leíbles, pero encontramos esta convención fea cuando se encaja ""en código Java."#: index.docbook:35msgid "The from clause"msgstr "La cláusula from"#: index.docbook:37msgid "The simplest possible Hibernate query is of the form:"msgstr "La consulta más simple posible de Hibernate es de la forma:"#: index.docbook:41msgid "<![CDATA[from eg.Cat]]>"msgstr "<![CDATA[from eg.Cat]]>"#: index.docbook:43msgid """which simply returns all instances of the class <literal>eg.Cat</literal>. ""We don't usually need to qualify the class name, since <literal>auto-import</""literal> is the default. So we almost always just write:"msgstr """que simplemente devuelve todas las instancias de la clase <literal>eg.Cat</""literal>. Usualmente no necesitamos cualificar el nombre de la clase, ya que ""<literal>auto-import</literal> está por defecto. De modo que casi ""siempre escribimos solamente:"#: index.docbook:49msgid "<![CDATA[from Cat]]>"msgstr "<![CDATA[from Cat]]>"#: index.docbook:51msgid """Most of the time, you will need to assign an <emphasis>alias</emphasis>, ""since you will want to refer to the <literal>Cat</literal> in other parts of ""the query."msgstr """La mayoría del tiempo, necesitarás asignar un <emphasis>alias</""emphasis>, ya que querrás referirte al <literal>Cat</literal> en ""otras partes de la consulta."#: index.docbook:57, index.docbook:372msgid "<![CDATA[from Cat as cat]]>"msgstr "<![CDATA[from Cat as cat]]>"#: index.docbook:59msgid """This query assigns the alias <literal>cat</literal> to <literal>Cat</""literal> instances, so we could use that alias later in the query. The ""<literal>as</literal> keyword is optional; we could also write:"msgstr """Esta consulta asigna el alias <literal>cat</literal> a las instancias de ""<literal>Cat</literal>, de modo que podríamos usar ese alias luego en ""la consulta. La palabra clave <literal>as</literal> es opcional; ""también podríamos escribir:"#: index.docbook:65msgid "<![CDATA[from Cat cat]]>"msgstr "<![CDATA[from Cat cat]]>"#: index.docbook:67msgid """Multiple classes may appear, resulting in a cartesian product or \"cross\" ""join."msgstr """Pueden aparecer múltiples clases, resultando en un producto ""cartesiano o unión \"cruzada\" (cross join)."#: index.docbook:71msgid "<![CDATA[from Formula, Parameter]]>"msgstr "<![CDATA[from Formula, Parameter]]>"#: index.docbook:72msgid "<![CDATA[from Formula as form, Parameter as param]]>"msgstr "<![CDATA[from Formula as form, Parameter as param]]>"#: index.docbook:74msgid """It is considered good practice to name query aliases using an initial ""lowercase, consistent with Java naming standards for local variables (eg. ""<literal>domesticCat</literal>)."msgstr """Se considera buena práctica el nombrar los alias de consulta usando ""una inicial en minúsculas, consistente con los estándares de ""nombrado de Java para variables locales (por ejemplo, <literal>domesticCat</""literal>)."#: index.docbook:83msgid "Associations and joins"msgstr "Asociaciones y uniones (joins)"#: index.docbook:85msgid """We may also assign aliases to associated entities, or even to elements of a ""collection of values, using a <literal>join</literal>."msgstr """Podemos también asignar aliases a entidades asociadas, e incluso a ""elementos de una colección de valores, usando una <literal>join</""literal>."#: index.docbook:90msgid """<![CDATA[from Cat as cat\n"" inner join cat.mate as mate\n"" left outer join cat.kittens as kitten]]>"msgstr """<![CDATA[from Cat as cat \n"" inner join cat.mate as mate\n"" left outer join cat.kittens as kitten]]>"#: index.docbook:92msgid "<![CDATA[from Cat as cat left join cat.mate.kittens as kittens]]>"msgstr "<![CDATA[from Cat as cat left join cat.mate.kittens as kittens]]>"#: index.docbook:94msgid "<![CDATA[from Formula form full join form.parameter param]]>"msgstr "<![CDATA[from Formula form full join form.parameter param]]>"#: index.docbook:96msgid "The supported join types are borrowed from ANSI SQL"msgstr "Los tipos de join soportados son prestados de ANSI SQL"#: index.docbook:103msgid "inner join"msgstr "inner join"#: index.docbook:108msgid "left outer join"msgstr "left outer join"#: index.docbook:113msgid "right outer join"msgstr "right outer join"#: index.docbook:117msgid "<literal>full join</literal> (not usually useful)"msgstr "<literal>full join</literal> (no útil usualmente)"#: index.docbook:123msgid """The <literal>inner join</literal>, <literal>left outer join</literal> and ""<literal>right outer join</literal> constructs may be abbreviated."msgstr """Las construcciones <literal>inner join</literal>, <literal>left outer join</""literal> y <literal>right outer join</literal> pueden ser abreviadas."#: index.docbook:128msgid """<![CDATA[from Cat as cat\n"" join cat.mate as mate\n"" left join cat.kittens as kitten]]>"msgstr """<![CDATA[from Cat as cat \n"" join cat.mate as mate\n"" left join cat.kittens as kitten]]>"#: index.docbook:130msgid """You may supply extra join conditions using the HQL <literal>with</literal> ""keyword."msgstr """Puedes proveer condiciones de unión extra usando la palabra clave ""<literal>with</literal> de HQL."#: index.docbook:135msgid """<![CDATA[from Cat as cat\n"" left join cat.kittens as kitten\n"" with kitten.bodyWeight > 10.0]]>"msgstr """<![CDATA[from Cat as cat \n"" left join cat.kittens as kitten \n"" with kitten.bodyWeight > 10.0]]>"#: index.docbook:137msgid """In addition, 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 """En adición, un \"fetch\" join permite a las asociaciones o ""colecciones de valores ser inicializadas junto a sus objetos padres, usando ""una sola selección. Esto es particularmente útil en el case de ""una colección. Efectivamente sobrescribe el outer join y las ""declaraciones perezosas (lazy) del fichero de mapeo para asociaciones y ""colecciones. Ver <xref linkend=\"performance-fetching\"/> para más ""información."#: index.docbook:145msgid """<![CDATA[from Cat as cat\n"" inner join fetch cat.mate\n"" left join fetch cat.kittens]]>"msgstr """<![CDATA[from Cat as cat \n"" inner join fetch cat.mate\n"" left join fetch cat.kittens]]>"#: index.docbook:147msgid """A fetch join does not usually need to assign an alias, because the ""associated objects should not be used in the <literal>where</literal> clause ""(or any other clause). Also, the associated objects are not returned ""directly in the query results. Instead, they may be accessed via the parent ""object. The only reason we might need an alias is if we are recursively join ""fetching a further collection:"msgstr """Usualmente a un fetch join no se necesita asignársele un alias, ""porque los objetos asociados no deben ser usados en la cláusula ""<literal>where</literal> (ni en cualquier otra cláusula). Ademá""s, los objetos asociados no son devueltos directamente en los resultados de ""consulta. En cambio, pueden ser accedidos vía el objeto padre. La ""única razón por la que necesitaríamos un alias es ""estamos uniendo recursivamente otra colección:"#: index.docbook:155msgid """<![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 """<![CDATA[from Cat as cat \n"" inner join fetch cat.mate\n"" left join fetch cat.kittens child\n"" left join fetch child.kittens]]>"#: index.docbook:157msgid """Note that the <literal>fetch</literal> construct may not be used in queries ""called using <literal>iterate()</literal> (though <literal>scroll()</""literal> can be used). Nor should <literal>fetch</literal> be used together ""with <literal>setMaxResults()</literal> or <literal>setFirstResult()</""literal> 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'd expect. Nor may <literal>fetch</literal> be used together ""with an ad hoc <literal>with</literal> 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 also ""sometimes gives unexpected results for bag mappings, so be careful about how ""you formulate your queries in this case. Finally, note that <literal>full ""join fetch</literal> and <literal>right join fetch</literal> are not ""meaningful."msgstr """Nota que la construcción <literal>fetch</literal> no puede usarse en ""consultas llamadas usando <literal>scroll()</literal> o <literal>iterate()</""literal>. Ni debe usarse <literal>fetch</literal> junto con ""<literal>setMaxResults()</literal> o <literal>setFirstResult()</literal>. ""Tampoco puede usarse <literal>fetch</literal> junto a una condición ""<literal>with</literal> ad hoc. Es posible crear un producto cartesiano ""trayendo por join más de una colección en una colecció""n, así que ten cuidado en este caso. Traer por join múltiples ""roles de colección también da a veces resultados inesperados ""para mapeos de bag, así que sé cuidadoso sobre cómo ""formular tus consultas en este caso. Finalmente, nota que <literal>full join ""fetch</literal> y <literal>right join fetch</literal> no son significativos."#: index.docbook:172msgid """If you are using property-level lazy fetching (with bytecode ""instrumentation), it is possible to force Hibernate to fetch the lazy ""properties immediately (in the first query) using <literal>fetch all ""properties</literal>."msgstr """Si estás usando recuperación perezosa a nivel de propiedad ""(con instrumentación de bytecode), es posible forzar a Hibernate a ""traer las propiedades perezosas inmediatamente (en la primera consulta) ""usando <literal>fetch all properties</literal>."#: index.docbook:178msgid "<![CDATA[from Document fetch all properties order by name]]>"msgstr "<![CDATA[from Document fetch all properties order by name]]>"#: index.docbook:179msgid """<![CDATA[from Document doc fetch all properties where lower(doc.name) like '%""cats%']]>"msgstr """<![CDATA[from Document doc fetch all properties where lower(doc.name) like '%""cats%']]>"#: index.docbook:184msgid "Forms of join syntax"msgstr "UNTRANSLATED!!! Forms of join syntax"#: index.docbook:186msgid """HQL supports two forms of association joining: <literal>implicit</literal> ""and <literal>explicit</literal>."msgstr """HQL supports two forms of association joining: <literal>implicit</literal> ""and <literal>explicit</literal>."#: index.docbook:190msgid """The queries shown in the previous section all use the <literal>explicit</""literal> form where the join keyword is explicitly used in the from clause. ""This is the recommended form."msgstr """The queries shown in the previous section all use the <literal>explicit</""literal> form where the join keyword is explicitly used in the from clause. ""This is the recommended form."#: index.docbook:195
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -