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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:47:18+00:00 2026-05-27T02:47:18+00:00

I am having a POJO class which consists of: – persistent properties, – transient

  • 0

I am having a POJO class which consists of:
– persistent properties,
– transient properties.

While writing HQL I considered both: persistent and transient properties.
I.e. HQL like select persistent_properties,transient_prop from Pojo_classname

is it correct?

Can I write @Basic annotation to transient variables?

  • 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-27T02:47:19+00:00Added an answer on May 27, 2026 at 2:47 am

    No, it’s not correct. A HQL query translates to SQL. An @Transient property is not in the database, so the SQL query won’t be able to query over this property.

    @Basic and @Transient are contradictory. The first one tells “this property is persistent” and the second one tells “This property is not persistent”.

    If you’re talking about the Java transient keyword, and not about the @Transient annotation, then yes, a transient field may be queried and annotated with @Basic. The transient keyword has nothing to do with persistence, only with binary serialization of the object.

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

Sidebar

Related Questions

Problem description: I have a POJO object, which is mapped from database. Which having
Via reflection I have found a lists of properties from x POJO classes which
Having been a PHP developer on LAMP servers for quite a while, is there
I'm having some trouble with GSON, mainly deserializing from JSON to a POJO. I
forum member I need one help from you all. I am having two POJO
Having the following classes (highly simplified): public class Child { public string Label; public
Having a grails domain class, how to find the type of a property having
In a case where Person is a POJO having a List of hobbies. Just
Having spent some time working on data warehousing, I have created both ETL (extract
Having a look at BDD frameworks and I can't help but wonder which one

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.