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 8872791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:18:21+00:00 2026-06-14T18:18:21+00:00

I have two classes(Pojos) name Soldbookdetails.java and Bookdetails.java , what I want to do

  • 0

I have two classes(Pojos) name Soldbookdetails.java and Bookdetails.java,
what I want to do is, I have to get data from Bookdetails table(Soldbookdetails.java) and save the same data to my Soldbookdetails table(Soldbookdetails.java).

ActionClass.java

private Double[] id;//With getter and setter
private Double[] quantity;  //With getter and setter
Bookdetails book=new Bookdetails();//pojos,//With getter and setter
Soldbookdetails sbook=new Soldbookdetails();//pojos,//With getter and setter 
BookdetailsDAO dao=new BookdetailsDAO(); 
SoldBooksTransactionDAO dao2=new SoldBooksTransactionDAO(); 
------------

(Note: my both pojo are same only their Class name are different)

My problem: I am unable to save record from Bookdetails.java to Soldbookdetails.java .(See My above ActionClass.java class,inside the execute method , i have mention the ERRROR).

After getting record by Bookid , i am unable to save the record into my Soldbookdetails.java.

Please help me to solve my problem.

  • 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-14T18:18:23+00:00Added an answer on June 14, 2026 at 6:18 pm

    Your saveSoldbooks(Soldbookdetails s) method takes an object of Soldbookdetails as argument but you are passing an object of class Bookdetails.

    The thing you can do is you can add a method that copies the attributes of an Bookdetails object to an Soldbookdetails object (without the id field). Then you should try to save the object of Soldbookdetails using your existing method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two classes which both derive from the same parent: public class People{
I have two classes (MVC view model) which inherits from one abstract base class.
I have two classes A and B generated by cxf-codegen-plugin from my WSDL. A
I have two classes, Item and SoldItem . SoldItem inherits from Item adding some
I have two classes, one that inherits from the other. The base class is
I have two classes(Book,Software) that inherit from the Product class. these two classes have
I have two classes: class Player { public string Id { set; get; }
Right now I have java program whose classes are currently POJOs and stored in
I have two classes that my pages and controls inherit from. These two classes
I have two simple POCO classes; I'm trying to get the MyY property below

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.