I have several entities that have transient properties that I would like to populate from the sql query. I have tried several things but have not found the correct combination yet.

here is an example entity

```
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
long id;
@Size(max=1000)
String image_url;

@Transient
boolean liked;

@Transient
long numLikes;

**getters and setters** for persistent properties

    public boolean isLiked() {
    return liked;
}

public void setLiked(boolean liked) {
    this.liked = liked;
}

public long getNumLikes() {
    return numLikes;
}

public void setNumLikes(long numLikes) {
    this.numLikes = numLikes;
}

```

I have tried using the @Basic anotation and setting it's fetch method to eager 

```
@Basic(fetch = FetchType.EAGER)

```

on the getters but that didn't seem to do anything. I've seen it set to lazy as well.

Am I missing anything in here that would cause a column name not be mapped to one of these transient properties?

here is my impl code.

```
SQLQuery query = getCurrentSession().createSQLQuery("" +
            "SELECT * ,count(likes1.liked) as numLikes " +
            "FROM aboutme " +
            "left JOIN " +
            "(" +
            "   select liked, likedObject_id " +
            "   from likes " +
            "   where liked = 1" +
            ") as likes1 ON aboutme.id = likes1.likedObject_id " +
            "left join " +
            "(" +
            "   select likedObject_id, liked " +
            "   from likes " +
            "   where liked = 1 and profile_id = :id" +
            ") as likes2 on likes2.likedObject_id = aboutme.id " +
            "WHERE aboutme.profile_id = :id " +
            "group by aboutme.id");

    query.addEntity(AboutMe.class);
    query.setParameter("id",id);

    return query.list();

```

I've tried using the 

```
  SQLQuery query = ..."Select count(value that returns properly) as {object.numLikes}..."

 query.addEntity("object",Object.class),

```

I get an error here that says it can't find the column name for property [property] for alias [alias]

What am I doing wrong?

Transient properties are probably not the way to go for what I am trying to do. what I need to figure out is how to map these derived columns to an object that I can return to the front end. how do I set up an object that hibernate can map these aliased columns to properties?