-->
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: This Java RFE could significantly improve Hibernate
PostPosted: Wed Sep 06, 2006 1:36 pm 
Beginner
Beginner

Joined: Wed Sep 06, 2006 12:08 pm
Posts: 48
Location: Warsaw - Poland - Europe - Milky Way
Hello,

This Java Request For Enhancement could significantly improve Hibernate and others ORMs (IMHO):
Synopsis: Make reflection more convenient to use
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4810162

With such feature the following pieces of code:
Code:
    Criteria crit = session.createCriteria(Cat.class);
    crit.add( Expression.eq("color", eg.Color.BLACK ) );


... would look like something like this:
Code:
    Criteria crit = session.createCriteria(Cat.class);
    crit.add( Expression.eq(Cat::color, eg.Color.BLACK ) );


So it would be possible to get rid of (almost) all those strings in Hibernate methods like Expresion.eq and similar.

Today programming IDEs are not able to treat those strings (eg.: "color") as references to field color of Cat class.
But with this Java enhancement IDEs would be able to index Cat::color and would be able to show us all references to this field.

What do you think about it?

btw:
Vote for this (or similar) RFE, please :)
I’ve already voted for this RFE.

Kind regards,
Adam Wozniak


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.