aspose file tools*
The moose likes Object Relational Mapping and the fly likes Problem in Constructor Expressions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Problem in Constructor Expressions" Watch "Problem in Constructor Expressions" New topic
Author

Problem in Constructor Expressions

Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
select NEW org.UserDto(distinct(orgreg.contactNumber)) from OrganisationRegistration orgreg

Hi
The above query throws runtime exception due to distinct keyword.

Is there any solution available.

Thanks
James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
DISTINCT only applies to the entire query (the only exception is its usage with an aggregate function).

Select distinct NEW org.UserDto(orgreg.contactNumber) from OrganisationRegistration orgreg


TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Constructor Expressions