-->
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.  [ 3 posts ] 
Author Message
 Post subject: Tuplizer/Custom ProxyFactory for EJB3
PostPosted: Tue Dec 05, 2006 3:00 am 
Newbie

Joined: Tue Dec 05, 2006 2:47 am
Posts: 9
3.2-GA


I am not using a hibernate.cfg.xml or mapping files, only annotations and persistence.xml.

1) Can I specify a custom, global Tuplizer without having to recreate all my mappings in a mapping file (ie, can I configure a TuplizerFactory or something)?

2) I am looking to implement Collections/Entity filtering based on many different criteria (not SQL criteria, but in code). Can I filter Collections as they are being populated via code, and can I restrict instantiation of entities in code?

The scenario is this: I am going to have plenty of ACL patterns defined in memory, and I would like to plug the code in at the O/R level to filter collections and also return null for ToOne mappings that are accessing a restricted entity. I understand @Filter's and such will give me functionality like this at the SQL level, but I need it in code.

Thanks

Aaron


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 07, 2006 1:15 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
1. is on my todo list
http://opensource.atlassian.com/projects/hibernate/browse/ANN-505

2. override the event lisnteners, it's probably the best way.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 08, 2006 4:05 am 
Newbie

Joined: Tue Dec 05, 2006 2:47 am
Posts: 9
thanks for implementing the #1, I have found another sollution using cglib proxies, but it would be nice to move that cleanly into the O/R framework rather than adding another layer of bytecode hacking on top of everything.

As far as #2 goes, how would I filter ejb3 associations using ejb3 annotations? I might be a noob, but I didn't think they can be applied to things like @ManyToOne, @OneToMany, and @OneToOne... do ejb3 filters allow you to filter the *selection* of these entities as they are returned from methods marked with these annotations?

Again, thanks for all the hard work.

Aaron


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

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.