Discussion:
[ceylon-dev] Java persistence interop getSingleResult()
Travis Brown
2017-04-11 00:59:21 UTC
Permalink
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
--
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 ceylon-***@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
2017-04-14 18:34:35 UTC
Permalink
Sure, I agree, would you do me a favor and open an issue against
ceylon-sdk, please?

TIA
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
shared Result? getSingleResult()
I would expect this to either not return null or to allow null to mean
"entity not found".
shared Anything getSingleResult()
This similar method (but pertaining to a stored proc query) catches
NoResultException and returns null.
Regards, Travis
--
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
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
***@ceylon-lang.org
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org
--
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 ceylon-***@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/CAP7PoCdn0JmhOgg-HjO2yAG-NmbX07zWSP3Vrjb-GYa242pR3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Travis Brown
2017-04-15 12:50:15 UTC
Permalink
Opened issue 663 <https://github.com/ceylon/ceylon-sdk/issues/663>

Travis
Post by Gavin King
Sure, I agree, would you do me a favor and open an issue against
ceylon-sdk, please?
TIA
Post by Travis Brown
I'm experimenting with the Ceylon + Wildfly (JaxRS and JPA) and have a
minor
Post by Travis Brown
API change suggestion for ceylon.interop.java.Query.
TypedQuery has this signature signature but throws NoResultException if
the
Post by Travis Brown
shared Result? getSingleResult()
I would expect this to either not return null or to allow null to mean
"entity not found".
shared Anything getSingleResult()
This similar method (but pertaining to a stored proc query) catches
NoResultException and returns null.
Regards, Travis
--
You received this message because you are subscribed to the Google
Groups
Post by Travis Brown
"ceylon-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an
<javascript:>.
Post by Travis Brown
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.
Post by Travis Brown
For more options, visit https://groups.google.com/d/optout.
--
Gavin King
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org
--
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 ceylon-***@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/f21d8aea-916b-4e74-86a7-b47b67275aa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Gavin King
2017-04-15 13:07:54 UTC
Permalink
Thanks.
Post by Travis Brown
Opened issue 663
Travis
Post by Gavin King
Sure, I agree, would you do me a favor and open an issue against
ceylon-sdk, please?
TIA
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
shared Result? getSingleResult()
I would expect this to either not return null or to allow null to mean
"entity not found".
shared Anything getSingleResult()
This similar method (but pertaining to a stored proc query) catches
NoResultException and returns null.
Regards, Travis
--
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
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
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org
--
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
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/f21d8aea-916b-4e74-86a7-b47b67275aa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Gavin King
***@ceylon-lang.org
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org
--
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 ceylon-***@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/CAP7PoCciBhBzv7HePZ0xVUn2rBbfKkT38iKz7MBJVZLEdZ%3DVmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...