for ( final String id : identifiers ) {
tagMap.put( id, Lists.<Tag>newArrayList() );
}
if ( !tagMap.isEmpty() ) {
final Tag example = example( owner );
<BUG>final DetachedCriteria detachedCriteria = DetachedCriteria.forClass( resourceClass )
.add( Restrictions.in( resourceClassIdField, Lists.newArrayList( identifiers ) ) )
.setProjection( Projections.id() );

final Criterion idRestriction = Property.forName( tagClassResourceField ).in( detachedCriteria );
try {</BUG>
final List<Tag> tags = Tags.list( example, Predicates.alwaysTrue(), idRestriction, Collections.<String,String>emptyMap()  );

for ( final String id : identifiers ) {
tagMap.put( id, Lists.<Tag>newArrayList() );
}
if ( !tagMap.isEmpty() ) {
final Tag example = example( owner );
final Criterion idRestriction = identifiersSize < 1000 ?
Property.forName( tagClassResourceField ).in( DetachedCriteria.forClass( resourceClass )
.add( Restrictions.in( resourceClassIdField, Lists.newArrayList( identifiers ) ) )
.setProjection( Projections.id( ) ) ) :
Restrictions.conjunction( );
try {
final List<Tag> tags = Tags.list( example, Predicates.alwaysTrue(), idRestriction, Collections.<String,String>emptyMap()  );
