user959690
user959690

Reputation: 620

How does Hibnerate choose property capitalization?

@Entity
class Host 
{
    private String Model;
    private String OS;

    @Column (name="OS")
    public String getOS() ...

    @Column (name="MODEL")
    public String getModel()...

}

So when I say Restriction.eq('OS", "foo") and Restriction.eq("model", "foo") it works but not "os" or "Model" or "MODEL". So way does the capitalization get dropped for model and not OS?

Upvotes: 0

Views: 211

Answers (1)

Alex Gitelman
Alex Gitelman

Reputation: 24722

It would determine capitalization by introspecting getter methods. You can read about conventions in Java Beans Specifications.

Upvotes: 1

Related Questions