Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/gettingStarted/advancedConfig.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ grails {
}
----

Available options and their descriptions are defined in the http://api.mongodb.org/java/current/com/mongodb/MongoClientOptions.html[MongoClientOptions] javadoc.
Available options and their descriptions are defined in the https://api.mongodb.org/java/current/com/mongodb/MongoClientOptions.html[MongoClientOptions] javadoc.

==== MongoDB Connection Strings


Since 2.0, you can also use MongoDB http://docs.mongodb.org/manual/reference/connection-string/[connection strings] to configure the connection:
Since 2.0, you can also use MongoDB https://docs.mongodb.org/manual/reference/connection-string/[connection strings] to configure the connection:

[source,groovy]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/introduction/compatibility.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This implementation tries to be as compatible as possible with GORM for Hibernate. In general you can refer to the http://grails.org/doc/latest/guide/5.%20Object%20Relational%20Mapping%20(GORM).html[GORM documentation] and the "Domain Classes" section of the http://grails.org/doc/latest/[reference guide] (see the right nav) for usage information.
This implementation tries to be as compatible as possible with GORM for Hibernate. In general you can refer to the https://grails.org/doc/latest/guide/5.%20Object%20Relational%20Mapping%20(GORM).html[GORM documentation] and the "Domain Classes" section of the https://grails.org/doc/latest/[reference guide] (see the right nav) for usage information.

The following key features are supported by GORM for Mongo:

Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/lowLevelApi.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
A lower level API is provided by the plugin via the MongoDB driver

NOTE: There is an excellent tutorial on how to use the MongoDB Java driver's API directly in the http://mongodb.github.io/mongo-java-driver/3.1/driver/getting-started/quick-tour/[MongoDB documentation]
NOTE: There is an excellent tutorial on how to use the MongoDB Java driver's API directly in the https://mongodb.github.io/mongo-java-driver/3.1/driver/getting-started/quick-tour/[MongoDB documentation]

An example can be seen below:

Expand All @@ -21,7 +21,7 @@ db.languages << [[name: 'Javascript', type: 'prototyped'], [name: 'Ioke', type:
----


To get hold of the `mongo` instance (which is an instance of the http://api.mongodb.org/java/current/com/mongodb/Mongo.html[com.mongodb.Mongo] class) inside a controller or service simple define a `mongo` property:
To get hold of the `mongo` instance (which is an instance of the https://api.mongodb.org/java/current/com/mongodb/Mongo.html[com.mongodb.Mongo] class) inside a controller or service simple define a `mongo` property:

[source,groovy]
----
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/objectMapping.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Person {
}
----

This will map onto a MongoDB http://api.mongodb.org/java/current/com/mongodb/client/MongoCollection.html[Collection] called "person".
This will map onto a MongoDB https://api.mongodb.org/java/current/com/mongodb/client/MongoCollection.html[Collection] called "person".


==== Embedded Documents
Expand Down Expand Up @@ -108,7 +108,7 @@ class Person {
}
----

If you are using the mapping engine, for non-embedded associations by default GORM for MongoDB will map links between documents using MongoDB http://docs.mongodb.org/manual/reference/database-references/[database references] also known as `DBRefs`.
If you are using the mapping engine, for non-embedded associations by default GORM for MongoDB will map links between documents using MongoDB https://docs.mongodb.org/manual/reference/database-references/[database references] also known as `DBRefs`.

If you prefer not to use DBRefs then you tell GORM to use direct links by using the `reference:false` mapping:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/objectMapping/customTypes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GORM for MongoDB will persist all common known Java types like String, Integer,

==== Custom Codecs

GORM for MongoDB is built ontop of MongoDB's BSON encoding framework. This means it is possible to implement custom http://mongodb.github.io/mongo-java-driver/3.2/bson/codecs[Codecs] for encoding and decoding values to and from BSON.
GORM for MongoDB is built ontop of MongoDB's BSON encoding framework. This means it is possible to implement custom https://mongodb.github.io/mongo-java-driver/3.2/bson/codecs[Codecs] for encoding and decoding values to and from BSON.

For example consider the following simple Groovy class:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/docs/asciidoc/objectMapping/idGeneration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ By default in GORM entities are supplied with an integer-based identifier. So fo
class Person {}
----

Has a property called `id` of type `java.lang.Long`. In this case GORM for Mongo will generate a sequence based identifier using the technique http://docs.mongodb.org/manual/tutorial/isolate-sequence-of-operations/[described in the Mongo documentation] on Atomic operations.
Has a property called `id` of type `java.lang.Long`. In this case GORM for Mongo will generate a sequence based identifier using the technique https://docs.mongodb.org/manual/tutorial/isolate-sequence-of-operations/[described in the Mongo documentation] on Atomic operations.

However, sequence based integer identifiers are not ideal for environments that require http://docs.mongodb.org/manual/sharding/[sharding] (one of the nicer features of Mongo). Hence it is generally advised to use either String based ids:
However, sequence based integer identifiers are not ideal for environments that require https://docs.mongodb.org/manual/sharding/[sharding] (one of the nicer features of Mongo). Hence it is generally advised to use either String based ids:

[source,groovy]
----
Expand All @@ -16,7 +16,7 @@ class Person {
}
----

Or a native BSON http://api.mongodb.org/java/current/org/bson/types/ObjectId.html[ObjectId]:
Or a native BSON https://api.mongodb.org/java/current/org/bson/types/ObjectId.html[ObjectId]:

[source,groovy]
----
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/objectMapping/writeConcern.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A feature of MongoDB is its ability to customize how important a database write is to the user. The Java client models this as a http://api.mongodb.org/java/current/com/mongodb/WriteConcern.html[WriteConcern] and there are various options that indicate whether the client cares about server or network errors, or whether the data has been successfully written or not.
A feature of MongoDB is its ability to customize how important a database write is to the user. The Java client models this as a https://api.mongodb.org/java/current/com/mongodb/WriteConcern.html[WriteConcern] and there are various options that indicate whether the client cares about server or network errors, or whether the data has been successfully written or not.

If you wish to customize the `WriteConcern` for a domain class you can do so in the mapping block:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/querying/geoSpatial.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MongoDB supports storing http://docs.mongodb.org/manual/applications/geospatial-indexes/[Geospacial data] in both flat and spherical surface types.
MongoDB supports storing https://docs.mongodb.org/manual/applications/geospatial-indexes/[Geospacial data] in both flat and spherical surface types.

To store data in a flat surface you use a "2d" index, whilst a "2dsphere" index used for spherical data. GORM for MongoDB supports both and the following sections describe how to define and query Geospacial data.

2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/querying/geoSpatial/2dindex.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MongoDB supports http://docs.mongodb.org/manual/core/2d/[2d indexes] that store points on a two-dimensional plane. although they are considered legacy and you should use `2dsphere` indexes instead.
MongoDB supports https://docs.mongodb.org/manual/core/2d/[2d indexes] that store points on a two-dimensional plane. although they are considered legacy and you should use `2dsphere` indexes instead.

It is possible to use a MongoDB 2d index by mapping a list or map property using the `geoIndex` mapping:

Expand Down
10 changes: 5 additions & 5 deletions docs/src/docs/asciidoc/querying/geoSpatial/2dsphere.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
==== Using a 2dsphere Index


MongoDB's http://docs.mongodb.org/manual/core/2dsphere/[2dsphere indexes] support queries that calculate geometries on an earth-like sphere.
MongoDB's https://docs.mongodb.org/manual/core/2dsphere/[2dsphere indexes] support queries that calculate geometries on an earth-like sphere.

Although you can use coordinate pairs in a 2dsphere index, they are considered legacy by the MongoDB documentation and it is recommended you store data using http://geojson.org/geojson-spec.html#id2[GeoJSON Point] types.
Although you can use coordinate pairs in a 2dsphere index, they are considered legacy by the MongoDB documentation and it is recommended you store data using https://geojson.org/geojson-spec.html#id2[GeoJSON Point] types.

WARNING: MongoDB legacy coordinate pairs are in latitude / longitude order, whilst GeoJSON points are stored in longitude / latitude order!

Expand All @@ -24,7 +24,7 @@ class Restaurant {
}
----

The `Point` type gets persisted as a http://geojson.org/geojson-spec.html#id2[GeoJSON Point]. A `Point` can be constructed from coordinates represented in longitude and latitude (the inverse of 2d index location coordinates!). Example:
The `Point` type gets persisted as a https://geojson.org/geojson-spec.html#id2[GeoJSON Point]. A `Point` can be constructed from coordinates represented in longitude and latitude (the inverse of 2d index location coordinates!). Example:

[source,groovy]
----
Expand Down Expand Up @@ -57,7 +57,7 @@ Restaurant.findByLocationGeoWithin( Sphere.valueOf( [[50, 50], 0.06]) )
Restaurant.findByLocationNear( Point.valueOf( 40, 40 ) )
----

NOTE: Note that a `Sphere` differs from a `Circle` in that the radius is specified in http://docs.mongodb.org/manual/tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes/[radians].
NOTE: Note that a `Sphere` differs from a `Circle` in that the radius is specified in https://docs.mongodb.org/manual/tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes/[radians].
There is a special `Distance` class that can help with radian calculation.


Expand All @@ -71,6 +71,6 @@ In addition to being able to pass any `Shape` to geospacial query methods you ca
def results = Restaurant.findAllByLocationNear( [$geometry: [type:'Point', coordinates: [1,7]], $maxDistance:30000] )
----

In the above example the native query parameters are simply passed to the http://docs.mongodb.org/manual/reference/operator/query/near/#op._S_near[$near query]
In the above example the native query parameters are simply passed to the https://docs.mongodb.org/manual/reference/operator/query/near/#op._S_near[$near query]


6 changes: 3 additions & 3 deletions docs/src/docs/asciidoc/querying/queryIndexes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Person {
}
----

You can use MongoDB http://docs.mongodb.org/manual/reference/operator/meta/hint/[Query Hints] by passing the `hint` argument to any dynamic finder:
You can use MongoDB https://docs.mongodb.org/manual/reference/operator/meta/hint/[Query Hints] by passing the `hint` argument to any dynamic finder:

[source,groovy]
----
Expand All @@ -48,7 +48,7 @@ Person.withCriteria {
==== Compound Indices


MongoDB supports the notion of http://docs.mongodb.org/manual/core/index-compound/[compound keys]. GORM for MongoDB enables this feature at the mapping level using the `compoundIndex` mapping:
MongoDB supports the notion of https://docs.mongodb.org/manual/core/index-compound/[compound keys]. GORM for MongoDB enables this feature at the mapping level using the `compoundIndex` mapping:

[source,groovy]
----
Expand All @@ -75,4 +75,4 @@ static mapping = {
}
----

In the above example I define an index on an embedded attribtue of the document. In fact what arguments you pass to the `index` method get passed to the underlying MongoDB http://api.mongodb.org/java/2.12/com/mongodb/DBCollection.html#createIndex(com.mongodb.DBObject,%20com.mongodb.DBObject)[createIndex] method.
In the above example I define an index on an embedded attribtue of the document. In fact what arguments you pass to the `index` method get passed to the underlying MongoDB https://api.mongodb.org/java/2.12/com/mongodb/DBCollection.html#createIndex(com.mongodb.DBObject,%20com.mongodb.DBObject)[createIndex] method.
2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/querying/queryingBasics.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GORM for MongoDB supports all of the http://gorm.grails.org/latest/hibernate/manual/index.html#querying[regular methods] for executing GORM queries apart from HQL, which is a Hibernate specific query language more appropriate for SQL databases.
GORM for MongoDB supports all of the https://gorm.grails.org/latest/hibernate/manual/index.html#querying[regular methods] for executing GORM queries apart from HQL, which is a Hibernate specific query language more appropriate for SQL databases.

If you wish to execute a native MongoDB query you can use the `find` method that takes a https://api.mongodb.com/java/current/org/bson/conversions/Bson.html[Bson] argument. For example:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/querying/textSearch.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Using MongoDB 2.6 and above you can create http://docs.mongodb.org/manual/reference/operator/query/text/#op._S_text[full text search] indices.
Using MongoDB 2.6 and above you can create https://docs.mongodb.org/manual/reference/operator/query/text/#op._S_text[full text search] indices.

To create a "text" index using the `index` method inside the `mapping` block:

Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/ref/Beans/mongo.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Provides access to the native http://api.mongodb.com/java/current/com/mongodb/async/client/MongoClient.html[MongoClient] instance.
Provides access to the native https://api.mongodb.com/java/current/com/mongodb/async/client/MongoClient.html[MongoClient] instance.

===== Examples

Expand All @@ -21,4 +21,4 @@ class FooController {

===== Description

See the API for the http://api.mongodb.org/java/current/[Mongo Java Driver] for API usage info.
See the API for the https://api.mongodb.org/java/current/[Mongo Java Driver] for API usage info.
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/ref/Domain Classes/DB.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==== Purpose

Returns the MongoDB http://api.mongodb.com/java/current/com/mongodb/async/client/MongoDatabase.html[MongoDatabase] object.
Returns the MongoDB https://api.mongodb.com/java/current/com/mongodb/async/client/MongoDatabase.html[MongoDatabase] object.

===== Examples

Expand All @@ -11,4 +11,4 @@ MongoCollection dbCollection = Book.DB.getCollection("books")

===== Description

The `DB` property allows access to the underlying MongoDB http://api.mongodb.com/java/current/com/mongodb/async/client/MongoDatabase.html[MongoDatabase] object, thus allowing easy access to the low-level MongoDB Java driver.
The `DB` property allows access to the underlying MongoDB https://api.mongodb.com/java/current/com/mongodb/async/client/MongoDatabase.html[MongoDatabase] object, thus allowing easy access to the low-level MongoDB Java driver.
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/ref/Domain Classes/collection.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Returns the MongoDB http://api.mongodb.com/java/current/com/mongodb/async/client/MongoCollection.html[collection] used for the current domain class
Returns the MongoDB https://api.mongodb.com/java/current/com/mongodb/async/client/MongoCollection.html[collection] used for the current domain class

===== Examples

Expand All @@ -11,4 +11,4 @@ def bookBson = Book.collection.find().first()

===== Description

The `collection` property allows access to the underlying MongoDB http://api.mongodb.com/java/current/com/mongodb/async/client/MongoCollection.html[MongoCollection] object, thus allowing direct access to the low-level MongoDB driver.
The `collection` property allows access to the underlying MongoDB https://api.mongodb.com/java/current/com/mongodb/async/client/MongoCollection.html[MongoCollection] object, thus allowing direct access to the low-level MongoDB driver.
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/ref/Domain Classes/collectionName.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Returns the name of the MongoDB http://api.mongodb.org/java/current/com/mongodb/DBCollection.html[collection] used for the current domain class
Returns the name of the MongoDB https://api.mongodb.org/java/current/com/mongodb/DBCollection.html[collection] used for the current domain class

===== Examples

Expand All @@ -11,4 +11,4 @@ println Book.collectionName

===== Description

The `collectionName` property allows introspection of the name of the http://api.mongodb.org/java/current/com/mongodb/DBCollection.html[DBCollection] object used by a given domain class. Can be used in conjunction with `useCollection` to switch to different collections and back again.
The `collectionName` property allows introspection of the name of the https://api.mongodb.org/java/current/com/mongodb/DBCollection.html[DBCollection] object used by a given domain class. Can be used in conjunction with `useCollection` to switch to different collections and back again.
2 changes: 1 addition & 1 deletion docs/src/docs/asciidoc/ref/Domain Classes/countHits.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Executes a MongoDB http://docs.mongodb.org/manual/reference/operator/query/text/#op._S_text[$text] search query and returns the number of hits.
Executes a MongoDB https://docs.mongodb.org/manual/reference/operator/query/text/#op._S_text[$text] search query and returns the number of hits.

===== Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/ref/Domain Classes/dbo.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Returns the MongoDB http://api.mongodb.com/java/current/org/bson/Document.html[Document] for an instance of a domain class
Returns the MongoDB https://api.mongodb.com/java/current/org/bson/Document.html[Document] for an instance of a domain class

WARNING: Using the `Document` object directly is discouraged, because it's inefficient. It's better to use <<dynamicAttributes>>.

Expand All @@ -15,4 +15,4 @@ println b.dbo

===== Description

The `dbo` property allows access to the underlying MongoDB http://api.mongodb.com/java/current/org/bson/Document.html[Document], which is a respresentation of the stored BSON document that can be manipulated in memory.
The `dbo` property allows access to the underlying MongoDB https://api.mongodb.com/java/current/org/bson/Document.html[Document], which is a respresentation of the stored BSON document that can be manipulated in memory.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Executes a MongoDB http://docs.mongodb.org/manual/reference/operator/query/geoIntersects/[$geoIntersects] query
Executes a MongoDB https://docs.mongodb.org/manual/reference/operator/query/geoIntersects/[$geoIntersects] query

===== Examples

Expand Down Expand Up @@ -39,4 +39,4 @@ assert Entry.findByShapeGeoIntersects( [ $geometry : [type: "Polygon" ,

===== Description

The $geoIntersects operator is a geospatial query operator that selects all locations that intersect with a GeoJSON object. See http://docs.mongodb.org/manual/reference/operator/query/geoIntersects/[$geoIntersects].
The $geoIntersects operator is a geospatial query operator that selects all locations that intersect with a GeoJSON object. See https://docs.mongodb.org/manual/reference/operator/query/geoIntersects/[$geoIntersects].
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Executes a MongoDB http://docs.mongodb.org/manual/reference/operator/query/geoWithin/[$geoWithin] query
Executes a MongoDB https://docs.mongodb.org/manual/reference/operator/query/geoWithin/[$geoWithin] query

===== Examples

Expand All @@ -17,4 +17,4 @@ Restaurant.findByPointGeoWithin([ '$polygon': [ [0.0d, 0.0d], [3.0d, 0.0d], [3.0
===== Description

The $geoWithin operator is a geospatial query operator that queries for a defined point, line or shape that exists entirely within another defined shape. When determining inclusion, MongoDB considers the border of a shape to be part of the shape, subject to the precision of floating point numbers.
See http://docs.mongodb.org/manual/reference/operator/query/geoWithin/[$geoWithin] for more information.
See https://docs.mongodb.org/manual/reference/operator/query/geoWithin/[$geoWithin] for more information.
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/ref/Domain Classes/findByNear.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===== Purpose

Executes a MongoDB http://docs.mongodb.org/manual/reference/operator/query/near/[$near] query
Executes a MongoDB https://docs.mongodb.org/manual/reference/operator/query/near/[$near] query

===== Examples

Expand All @@ -19,4 +19,4 @@ Restaurant.withCriteria {

===== Description

Specifies a point for which a geospatial query returns the closest documents first. The query sorts the documents from nearest to farthest. See http://docs.mongodb.org/manual/reference/operator/query/near/[$near] documentation for more info.
Specifies a point for which a geospatial query returns the closest documents first. The query sorts the documents from nearest to farthest. See https://docs.mongodb.org/manual/reference/operator/query/near/[$near] documentation for more info.
Loading