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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:12:39+00:00 2026-06-03T16:12:39+00:00

I’m trying insert on a view using datanucleus, the problem is, when i put

  • 0

I’m trying insert on a view using datanucleus, the problem is, when i put @Persistent in field that has no corresponding field in table and i catch the error:

11:03:42,782 INFO [br.com.sigel.server.censo.dao.persistentDAO.ParametrosCensoDAO] – javax.jdo.JDODataStoreException: Exception thrown flushing changes to datastore
NestedThrowables:
java.sql.BatchUpdateException: ORA-01733: virtual column not allowed here

but when i put @NotPersistent, don’t get fields from view and fields stay empty.
I need these fields are completed according to the view, but never overwritten (read-only).

My code is:

    @PersistenceCapable(identityType = IdentityType.APPLICATION,detachable="true", table="VW_FILA_CENSO") 
    @Sequence(datastoreSequence = "SEQ_SG_FICE_SEQ", strategy = SequenceStrategy.CONTIGUOUS, name = "seqFice")
    @Cacheable("false")
    public class SG_Fila_Censo implements BeanModelTag,Serializable {
private static final long serialVersionUID = 1L;
@NotPersistent 
private Integer escoSeq;
@Persistent(primaryKey="true", valueStrategy=IdGeneratorStrategy.SEQUENCE, sequence="seqFice")
    private Integer fice_seq;

@Persistent
private Date fice_data_solicitacao; 

@Persistent
private Boolean fice_processando;

@Persistent
private Boolean fice_priorizado;

@Persistent
private Integer fice_rece_seq;

@Persistent
private Integer fice_colb_seq;

@Persistent
private String unidade_escolar;

@Persistent
private String nome_colaborador;

@Persistent
private Integer etapa_relatorio;

@Persistent
private String cree_cod;

…

My view is:

CREATE OR REPLACE VIEW "SCH_SECULT3"."VW_FILA_CENSO"
(FICE_SEQ,FICE_DATA_SOLICITACAO,FICE_PROCESSANDO,FICE_PRIORIZADO,FICE_RECE_SEQ,FICE_COLB_SEQ,unidade_escolar,nome_colaborador,cree_cod,etapa_relatorio)
AS
(SELECT
    SG_FILA_CENSO.FICE_SEQ,
    SG_FILA_CENSO.FICE_DATA_SOLICITACAO,
    SG_FILA_CENSO.FICE_PROCESSANDO,
    SG_FILA_CENSO.FICE_PRIORIZADO,
    SG_FILA_CENSO.FICE_RECE_SEQ,
    SG_FILA_CENSO.FICE_COLB_SEQ,
    VW_RELATORIO_CENSO.unidade_escolar,
    VW_RELATORIO_CENSO.nome_colaborador,
    VW_RELATORIO_CENSO.cree_cod,
    VW_RELATORIO_CENSO.rece_etapa
    FROM SG_FILA_CENSO,VW_RELATORIO_CENSO
    where SG_FILA_CENSO.fice_rece_seq = VW_RELATORIO_CENSO.rece_seq
);

Anyone can help me? Thank you.

  • 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-03T16:12:41+00:00Added an answer on June 3, 2026 at 4:12 pm

    As far as I know you can’t use JDO for write operations on a view (even though the DB might support it). You can however use a DataNucleus extension (so its not part of the JDO specification) for read purposes on a view. This Documentenion of DataNucleus show you how you can use the views for readonly purposes.

    The ‘@NotPersisted’ annotation tells DataNucleus it should leave the field alone so its only logical it does not populate it with data from the DB.

    I also noticed some other things in your code example; Why aren’t you using primitives for booleans and integers ? Their Object counter parts (which you are using) are generally only used for use in Generic collections and if you really need ‘null’ as a value. Autoboxing ensures that you don’t see the difference. Primatives are faster and don’t use as much memory and therefor it is common practice to use those instead.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

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.