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

  • SEARCH
  • Home
  • 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 8953423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:05:28+00:00 2026-06-15T14:05:28+00:00

On the language that I know, RPG… You can use multiple keys and find

  • 0

On the language that I know, RPG… You can use multiple keys and find retrieve the values of the record.

Like for table. I can select keys lolo and apple to retrieve the value of sex witch is F. Howerver I could not find some functionality that is like this in OPENJPA.. find() can only use one key? Is there something like find(names.class,:”LOLO”,”Apple”) where keys are F_NAME and L_NAME?

Names
F_NAME   L_NAME   Sex
LOLO     Apple     F

Ben      Coke      M

While reading jpa, usually the table has P_ID

P_ID     F_NAME  L_NAME  Sex
1        LOLO     Apple   F 
2        Ben      Coke    M

To retrieve the record lolo apple, i need to use this code..

Names name = em.find(Names.class, 1);

How will you know the sex if the given value is F_NAME? and L_NAME? In SQL you can just say select * from Names where F_NAME = Lolo , L_NAME = “Apple” and it will output

P_ID     F_NAME  L_NAME  Sex
1        LOLO     Apple   F 

From that you can say that Sex = F.
Like i want to know if lolo apple is male or female, I will search lolo apple on the database… not P_ID = 1. How would i konw what is the P_ID of Lolo Apple.

Hopefully you get what I mean.. Thanks.

Or maybe in another part of the equation, on JPA, how to you retrieve the record to be updated while not knowing yet the P_ID (Primary key) like you only know the first name and last name?

  • 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-06-15T14:05:30+00:00Added an answer on June 15, 2026 at 2:05 pm

    If you look at the OpenJPA documentation it defines a JPA Query Language [JPQL]. Wouldn’t that be the place to start?


    UPDATE

    If you want to specify several key values, why not just specify them in the WHERE clause in JPQL, like you would do in SQL.

    SELECT ...
      WHERE colX = val1 and colY = val2 and colZ = val3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the PHP language for file upload and want to know that the
I know that assembly language is typically not cross-platform. And even with things like
Do you know any programming language that implements abstract machines like Turing machines and
I know that Powershell is quite powerful in that it is a scripting language
Language Integrated Query. Now I know that the acronyms are. I have seen C#
Or any other normal scripting language for that matter. I know there is VBScript
I want to have a flexible templating language that I can customize for a
Which is the best and suitable programming language that I can develop a game
I like Clojure. One thing that bothers me about the language is that I
I'm looking for a fast language (ie. a language that can be compiled natively

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.