Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6599887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:32:59+00:00 2026-05-25T18:32:59+00:00

select from comments.Comment where ownerType == ‘looks.Look’ AND ownerName == ‘Yakuza’ order by date

  • 0
select from comments.Comment 
where ownerType == 'looks.Look' 
AND ownerName == 'Yakuza' order by date

I get exception:

Portion of expression could not be parsed: AND ownerName == 'Yakuza'

While this query works nice:

select from comments.Comment 
where ownerType == 'looks.Look' 
order by date

And this too:

select from comments.Comment 
where ownerName == 'Yakuza' order by date

The full code:

PersistenceManager pm = PMF.get().getPersistenceManager();
String query = "... query goes here ...";
List<Comment> comments = null;
try {
    comments = (List<Comment>) pm.newQuery(query).execute();
}
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:33:00+00:00Added an answer on May 25, 2026 at 6:33 pm

    Replace “AND” with “&&”

      PersistenceManager pm = PMF.get().getPersistenceManager();
      try {
        Query query = pm.newQuery("select from " + Song.class.getName()
            + " where mArtist== '" +artist+
            "' &&  mTitle=='"+title+
            "' &&  mAlbum=='"+album+"'" );
        List<Song> list = (List<Song>) query.execute();
      } catch (RuntimeException e) {
        System.out.println(e);
        throw e;
      } finally {
        pm.close();
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SELECT comments.comment, comments.title, userBase.uID, userBase.fname FROM comments JOIN userBase WHERE comment.ID=users.ID AND comments.uID='$uID' AND
I need to select data from 2 tables in my DB - comments and
SELECT * FROM (SELECT ROW_NUMBER() over ( ORDER BY CASE WHEN @SortExpression ='Country_id' THEN
I need to get a list of Articles sorted by the latest Comment from
My query: SELECT issues.*, comments.author AS commentauthor, comments.when_posted AS commentposted FROM issues LEFT JOIN
I'm struggling to get the following MySQL statement to work. SELECT ItemGroup.users_id,ItemGroup.comments_id,ItemGroup.uploads_id,ItemGroup.posts_id, Comment.id,Comment.uploads_id, CommentUpload.id,
I can not seem to get comments per movie from moviesDetail.jsp. What am I
I have some code which retrieves user comments from my database: $comments = mysql_query(SELECT
Need help with converting next statement to LINQ: SELECT * FROM comments WHERE good_id
var q = (from Comments in db.tblBlogComments where Comments.blogID == this.ID orderby Comments.date descending

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.