-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Can filters works only on subclasses?
PostPosted: Wed May 27, 2009 9:42 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 8:26 am
Posts: 25
Hello,

I'm starting to use Filters and it works fine with classes without inheritance, but when a class is subclass of another the filter doesn't work if put it only in the sub class. Is it supposed to work like this?

The code that doesn't work is:
The superclass:
Code:
@Entity
@DiscriminatorColumn(name = "CF", discriminatorType = DiscriminatorType.STRING)
public abstract class CliFor implements Serializable { //...


The subclass:
Code:
@Entity
@DiscriminatorValue("C")
@Filter(
    name = "filtrarPorVendedor",
    condition = /* the condition */
)
public class Cliente extends CliFor {


If I remove the @Filter from Cliente and put it on CliFor it starts to work. Why? Shouldn't I be able to Filter only subclasses?

Regards,

_________________
---
Felipe Marin Cypriano


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.