Hi all,

I'm on deltaspike version 1.9.0 and when trying to obtain a criteria builder, 
my mapper is called in an attempt to conver the criteria builder into a DTO.


@ApplicationScoped
class SomeMapper extends SimpleQueryInOutMapperBase<SomeEntity, SomeDTO> {
    SomeDTO toDto(SomeEntity entity) { ... }
}

@Repository(forEntity = SomeEntity.class)
@MappingConfig(SomeMapper.class)
public abstract class SomeRepository extends 
AbstractFullEntityRepository<SomeDTO, String> {
    List<SomeDTO> someCustomQuery() {
        getCriteriaBuilder();
    }
}

When someCustomQuery is invoked, it attempts to map a CriteriaBuilderImpl into 
a DTO object, which causes a ClassCastException when reaching SomeMapper.


It is expected behavior, or is this a bug?

Kind regards,

Brecht


Privileged Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone.&nbsp;In such case, you should destroy this message and kindly notify 
the sender by reply email.&nbsp; &nbsp;Please advise immediately if you or your 
employer does not consent to Internet email for messages of this kind.&nbsp; 
&nbsp;Opinions, conclusions and other information in this message that do not 
relate to the official business of my firm shall be understood as neither given 
nor endorsed by it.


Reply via email to