Moving on with relation types in NHibernate - we haven't talked about <one-to-one> yet. The name suggests that it's designed for 1:1 relationships and this is not quite correct. 1:1 relationships can be mapped simply using many-to-one with unique constraint. One-to-one is designed specifically for making that many-to-one relationship with unique constraint bidirectional.
This kind of relation is mapped using many-to-one on the side that owns the relationship (in terms of having foreign key column in the database) and one-to-one on the second side. Note that at one-to-one side there's no column at the database level - the relationship from "one" side is "virtual", maintained only by NHibernate.
In mapping-by-code we're mapping it using OneToOne method. It has two parameters. The first one is the lambda pointing to the mapped property, as always. The second one are the options.
OneToOne(x => x.User, m =>
m.Lazy(LazyRelation.Proxy); // or .NoProxy, .NoLazy
m.Formula("arbitrary SQL expression");
Two things to note here. The first one is the lack of possibility to choose the fetch mode and foreign key name. The second one is the cumbersome construct needed to map property-ref option - the method is called PropertyReference instead of standard PropertyRef and its parameter is MethodInfo-typed instead of standard lambda expression or string at least. It looks like the feature went to production before it was finished.
Fluent NHibernate's equivalent
Fluent NHibernate's name for one-to-one is HasOne. I think this is the most often misused method in FNH as it looks like a natural sibling for HasMany and HasManyToMany and it seems to be a good choice for many-to-one mapping (which turns out to be mapped by References method). A bit messy, isn't it?
Here's how to use it:
HasOne(x => x.User)
.LazyLoad(Laziness.Proxy) // or .NoProxy, .False
.PropertyRef(x => x.OtherSideProperty)
.Fetch.Join() // or .Select(), .Subselect()
Apart for the name issue, it's a bit better than in mapping-by-code this time. The only option not available here is formula.