fluent-hibernate
fluent-hibernate copied to clipboard
Why are you calling this "Fluent" when @Annotations seem to be required
Am I missing something?
I see annotations galore in the start up example. How is that "fluent"?
**@Entity**
**@Table(name = "users")**
public class User {
**@Id
@Column(name = "pid")**
private Long pid;
**@Column(name = "login")**
private String login;
**@ManyToOne
@JoinColumn(name = "fk_department")**
private Department department;
}
NHibernate has a Fluent implementation.
https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Getting-started
public class Employee /* << No Annotations/Attributes*/
{
public virtual int Id { get; protected set; }
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual Store Store { get; set; }
}
public class EmployeeMap : ClassMap<Employee>
{
public EmployeeMap()
{
Id(x => x.Id); /* << FLUENT */
Map(x => x.FirstName); /* << FLUENT */
Map(x => x.LastName); /* << FLUENT */
References(x => x.Store); /* << FLUENT */
}
}
@granadacoder Fluent means just fluent API. It is not related to "fluent" features of NHibernate.
https://en.wikipedia.org/wiki/Fluent_interface
It looks like the Criteria and such are fluent. But the mappings themselves are not fluent. They are annotation driven.
Just putting a clarification out there as I see it.
Thanks for your efforts on this library.
@granadacoder Thank you!