Java persistence interop getSingleResult()

41 views
Skip to first unread message

Travis Brown

unread,
Apr 11, 2017, 2:52:52 AM4/11/17
to ceylon-dev
I'm experimenting with the Ceylon + Wildfly (JaxRS and JPA) and have a minor API change suggestion for ceylon.interop.java.Query.

TypedQuery has this signature signature but throws NoResultException if the entity is not found:
shared Result? getSingleResult()

I would expect this to either not return null or to allow null to mean "entity not found".


Below in the same file, QueryResults has this signature:
shared Anything getSingleResult()

This similar method (but pertaining to a stored proc query) catches NoResultException and returns null.


Regards, Travis


Gavin King

unread,
Apr 14, 2017, 2:34:56 PM4/14/17
to ceylo...@googlegroups.com
Sure, I agree, would you do me a favor and open an issue against
ceylon-sdk, please?

TIA
> --
> You received this message because you are subscribed to the Google Groups
> "ceylon-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ceylon-dev+...@googlegroups.com.
> To post to this group, send email to ceylo...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ceylon-dev.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceylon-dev/d6e59531-ecef-4b78-a717-522c62b90eb5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Gavin King
ga...@ceylon-lang.org
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org

Travis Brown

unread,
Apr 15, 2017, 8:50:15 AM4/15/17
to ceylon-dev
Opened issue 663

Travis

Gavin King

unread,
Apr 15, 2017, 9:08:15 AM4/15/17
to ceylo...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages