Deprecation of Hibernate Criteria and how we can still prevent it

Well, what i am talking about is part of hibernate, i assume that all know this, but here is the example, a very basic one.

The entity:

@Entity
public class Concept{
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	int id;
	
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	Project project;
    
    @ManyToOne(optional = true, fetch = FetchType.LAZY)
	Concept parent;
    
    @Column(nullable = false, precision = 16, scale = 6)
	BigDecimal quantity;
    
    @Column(nullable = false, precision = 16, scale = 6)
	BigDecimal cost;
    
    @Column(nullable = false, precision = 16, scale = 6)
	BigDecimal import;
    
    //..getters and setters
}

I can query the entity with criteria api and with JPA criteria too:

Project project = getSession().find(Project.class, projectId);
List<Concept> firstLevel = getSession().createCriteria(Concept.class)
			.add(Property.forName("project").eq(project))
			.add(Property.forName("parent").isNull())
			.list();
return entitiesToDtos(firsLevel);

When a client request the concepts for first level, i fetch the entities with the above way, and then i iterate them and create a DTO for each one. To avoid that i create an Concept.dto.hbm.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="false">
  <class mutable="false" name="com.common.dto.ConceptDto">
    <subselect>
			select 
				e.id as id,
                e.project_id as projectId,
                coalesce(e.parent_id, 0) as parentId,
                e.quantity as quantity,
                e.cost as cost,
                e.import as import

			from CONCEPT e

		</subselect>
    <id name="id"/>
    <property name="projectId"/>
    <property name="parentId"/>
    <property name="quantity"/>
    <property name="cost"/>
    <property name="import"/>
  </class>
</hibernate-mapping>

With that mapping loaded into hibernate, i can query that dto using criteria api but NOT with jpa criteria, it excepts with error that the object is not and entity:

return getSession().createCriteria(ConceptDto.class)
			.add(Property.forName("projectId").eq(projectId))
			.add(Property.forName("parentId").eq(0))
			.list();

I query a pojo like it was an entity, with no additional dependencies, no additional tools nor frameworks, just hibernate. The query in the mapping file can be as complex as the needs requires: joins, unions, views, anything i want and hibernate do all the work. I can not query that object in jpa because it only works with entities. If criteria api were removed completely, i lost the option to querying pojos.

Thanks