Skip to content

Commit 7d314b1

Browse files
Felixandreasprlic
authored andcommitted
/* Loading objects. */
1 parent 19c8b30 commit 7d314b1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_wikis/BioJava:BioJavaXDocs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,7 @@ table columns. The following query selects the namespace that is called
23292329
<java> Query q = session.createQuery("from Namespace where name=:name");
23302330
q.setString("name","bloggs"); List namespaces = q.list(); // should only
23312331
contain one Namespace object. Empty if none found. Namespace ns =
2332-
(Namespace)q.uniqueObject(); // alternative notation for queries with
2332+
(Namespace)q.uniqueResult(); // alternative notation for queries with
23332333
single-row results </java>
23342334

23352335
You don't have to worry about foreign keys, and can just join objects

_wikis/BioJava:BioJavaXDocs.mediawiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2219,7 +2219,7 @@ To set constraints your query should refer to object parameters, not table colum
22192219
Query q = session.createQuery("from Namespace where name=:name");
22202220
q.setString("name","bloggs");
22212221
List namespaces = q.list(); // should only contain one Namespace object. Empty if none found.
2222-
Namespace ns = (Namespace)q.uniqueObject(); // alternative notation for queries with single-row results
2222+
Namespace ns = (Namespace)q.uniqueResult(); // alternative notation for queries with single-row results
22232223
</java>
22242224

22252225
You don't have to worry about foreign keys, and can just join objects directly without specifying which field to use. This query returns all RichSequence objects that have a comment that contains the word "rubbish" with a rank of 0:

0 commit comments

Comments
 (0)