JDev generates incomplete Tables from JPA entities

I've got some JPA entities and I'm trying to generate the DB schema from them in Jdeveloper.
All tables are only generated with the Id (Primary Key) and not any additional fields/constraints I've defined in the Entity classes.
Any ideas what I should be looking at?
JDev 11.1.1.3 connecting to Oracle 10g XE
Edited by: new_to_webcenter on 21-Jan-2011 03:20

@Shay,
In a new JPA app, I've created
New Business Tier > EJB > Entity
Choose Persistence Unit and OFfline DB , Choose No Inheritance
Ticked on "Create Offline Table"
Include @Id field without a Sequencer
In the generated Entity class, I've added a new private field Name with setter/getter.
I've added these via the Structure > EJB > Add new field > generate accessors.
I've also specified @Column for the private field Name .
Next in the offline DB source, I right-click the Table > Generate to Connection > and go through the steps , choosing CREATE table.
In the created table as well as the generated SQL script, the Name column does not appear.
It creates a table in the DB with only the ID column.
Edit: I've checked again - if i click on the offline db source > table > columns - even there it only shows ID and no NAME column.
Any ideas - i'm definitely missing a step?
In persistence.xml I've specified
<property name="eclipselink.target-server" value="WebLogic_10"/>
<property name="eclipselink.ddl-generation.output-mode"
                    value="database" />
@dvohra16 : Nope I dont need the sequencer at present.
Edited by: new_to_webcenter on 21-Jan-2011 22:37
Edited by: new_to_webcenter on 21-Jan-2011 22:58

Similar Messages

  • Generate database tables from Business Components

    Is it possible to generate the database tables from a set of existing business components?
    This would be a handy feature to have, similar with JPA tables generation based on Entity Beans.
    Thanks
    Florin Marcus

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dmitri:
    Dear Laura,
    I mean first variant where the database would be the same:
    scott/tiger@database1
    foo/bar@database1
    Of course I understand that we must register every user in database by "CREATE USER XXX" and it is unacceptable for Internet. But it may be very convenient for an Intranet because we can build access restriction based on set of views without any changes in applications.
    Best wishes,
    Dmitri.<HR></BLOCKQUOTE>
    null

  • Generating database tables from Java classes

    Hi,
    I've encountered a number of tools which will create Java classes from database tables (e.g. JDeveloper has this functionality, Abator provides this for iBATIS, etc...).
    However, I've not been able to locate any tools that perform the opposite job - i.e. given a Java class, it generates a database table (or, presumably, some SQL).
    It's been suggested to me that Hibernate might provide this sort of capability, but if anybody has any experience of doing this, in any tool, I'd be interested to hear about it.
    Thanks,
    Alistair.

    Many thanks for the pointers.
    duffymo: I've taken a look at Middlegen (http://boss.bekk.no/boss/middlegen/index.html) but it seems that the first step is to specify the database schema, whereas I'm looking to generate the schema from existing code. Or have I missed something?
    Alistair.

  • Generate delete tables from dictionary

    Hi,
    I have a  CAF project that I´ve imported from a track, so far ok, I click to build and it works, but when I try generate it again it marks the tables from the dictionary project as deleted and remove them from my project, so i have two doubts:
    1 - Has any one any idea what happened? Why they are deleted?
    2 - Is it possible to undelete the table? The file still there but all the configuration is lost, the list of columns is lost.
    Thanks and best regards,
    Eduardo

    In the package hierarchy (applications navigator), right-click the package containing your EO's, choose "Generate Database Objects"
    Voila
    John

  • How to get generated sequence number from JPA/TopLink

    Hi there,
    I am using JDev 10.1.3.3 with JPA + POJO + TopLink.
    In the entity (POJO), I declared a sequence generated for a number field.
    @Id
    @GeneratedValue(strategy=SEQUENCE, generator="GEN_CUSTOMER_ID_SEQ")
    @SequenceGenerator(name="GEN_CUSTOMER_ID_SEQ", sequenceName="CUSTOMER_ID_SEQ", allocationSize=1)
    @Column(name="CUSTOMER_ID", nullable = false, precision = 12 )
    private Long customerId;
    In my program, I don't need to set the Id field because it is set automatically.
    However, I want to get the generated sequence using code. Is there a way?
    Thanks,
    Jim
    P.S. I cannot use getCustomerId because the value has not been set yet.

    If you call persist on the new Entity, or flush() the id will be assigned, and you can get it.
    There is also an API on the TopLink / EclipseLink Session getNextSequenceNumberValue(), that you can use to get a sequence value.
    -- James: http://www.eclipselink.org

  • Please help to generate the table from column to rows

    Hello -
    I have one table with more than 100 columns there are 70 column start with HC1.....HC70 (they are not in sequence) and has some value 0 or 1
    Table structure:
    HICN_ID HC1 HC2 HC4 HC5 HC6.................................HC70
    1234A 0 1 1 0 1 1
    3456D 1 0 0 1 0 0
    Now What i want is like this..
    HICN_ID HC
    1234A 2
    1234A 4
    1234A 6
    3456D 1
    3456D 5
    Can you please help me on this
    thanks
    nick

    Please look at the same scenario from the below link.
    You can accomplish this by a "pivot" query. Please look at the small testcase that I prepared below:
    SQL> desc t1
    Name Null? Type
    NAME VARCHAR2(10)
    YEAR NUMBER(4)
    VALUE NUMBER(4)
    SQL>
    SQL> select * from t1;
    NAME YEAR VALUE
    john 1991 1000
    john 1992 2000
    john 1993 3000
    jack 1991 1500
    jack 1992 1200
    jack 1993 1340
    mary 1991 1250
    mary 1992 2323
    mary 1993 8700
    9 rows selected.
    SQL> -- now, try out the pivot query
    SQL> select year,
    2 max( decode( name, 'john', value, null ) ) "JOHN",
    3 max( decode( name, 'jack', value, null ) ) "JACK",
    4 max( decode( name, 'mary', value, null ) ) "MARY"
    5 from
    6 (
    7 select name, year, value
    8 from t1
    9 )
    10 group by year ;
    YEAR JOHN JACK MARY
    1991 1000 1500 1250
    1992 2000 1200 2323
    1993 3000 1340 8700
    SQL>
    Hope that helps.
    Source : http://p2p.wrox.com/oracle/11931-sql-query-convert-columns-into-rows.html
    Thanks,
    Balaji K.

  • Create database tables from an xsd

    Is it possible to generate database table from a given xsd using toplink ?
    I want to use these tables to persist java objects obtained by unmarshalling the xml (corresponding to this xsd).
    Thanks in advance,
    Mahima

    Hello Mahima,
    Although you could use TopLink to generate a database schema from an XSD using a combination of wizards available in the TopLink Workbench, the resulting database schema would probably not be an optimal design. If you're interested we can talk about how to use this approach as a guide.
    Is your main use case the generation of a database schema or the actual movement of database data to/from XML?
    Using a combination of TopLink's object-relational and object-XML support to move data between XML and a relational database is a valid pattern. Refer to the discussion thread below for some approaches at setting up the metadata.
    TopLink-JAXB : Creating and Mapping tables from Toplink-JAXB POJOs.
    -Blaise

  • How to generate a report from crm table to find out user status changes

    Dear all,
    Could you please help me on generating a report from SAP CRM table level
    to find out user status changes in crm orders for a specific period of time?
    Thanks in advance,
    Regards,
    Shaik

    Hi Shaik.
    You would not need to write report for this. You need to create a Table view mainenance for the CRMD_ORDERADM_H or CRMD_ORDERADM_I for whichever  you need.
    Follow the below or search on google for more on table view maintenance.
    Go to SE11, give the table name and click on change. Then Go to utilities--> Table maintenance generator.
    In the table maintenance generator screen, you should give Authorization Group,
    Function Group name (Function Group name can be same as table name),
    Maintenance type can be one step or two step, usually you will create with one
    step. You should give maintenance screen number. After clicking on create button,
    a table maintenance generator will be created.
    To check it go to SM30 . In SM30, you find display, Maintain options.
    You can view the table contents by choosing Display and  supplying the selection criteria of dates.
    Regards
    Apoorva

  • Generate XML File from table

    How to generate XML file from a table without using UTL_FILE that too in local machine...

    You downloaded the wrong XML Parser!
    XSQL requires Java Parser. Well, there's a copy included with the XSQL package so you actually don't need to do another download.
    You really don't need XSQL if you just want a XML file from DB, you just needed a XML SQL Utility. Download that and run the samples.

  • How can I generate a table of contents from bookmarks

    How can I generate a Table of Contents from bookmarks in Adobe Acrobat XI?

    Something to try.
    Rick Bostein  provided a "Create Bookmark Report" Acrobat Action.
    With this report as a PDF you could insert it at the start of your PDF document to serve as a "TOC". 
    Go here:
    https://acrobatusers.com/actions-exchange 
    Scroll down some.
    Be well...

  • Generate PDF file from oracle Table

    We need to populate pdf file into oracle table of column blob through informatica by taking
    path\name(/path/filename.PDF) as input from source table.
    The pdf file is on some other server so, we need to create a stored procedure which will give pdf file as output from
    other server by taking path\name from source table column as mentioned above.
    So please suggest how we can create a stored procedure for that purpose.
    If possible please share some script.

    Dear all,am new to oracle report and oracle forms and i know the
    basics how to generate the report and to create the form, Now my doubt is, like generating report
    from oracle report how to generate the report from oracle from,should i add any command button? and where
    to add the coding and what coding ? when i click that command button the report should be generated like oracle
    report,what should i do?Please help me to learn.
    my table name is 'student' and it has the following columns,
    sid,sname,grade,result.
    Am using oracle from 10.1.2.0.2 version and
    oracle report version is 10.1.2.0.2.
    Please give step by step procss.
    Thank you.

  • Urgetnt:Generate XML Document from Oracle Tables.

    Environment is :9i Release 2
    Requirement : Generate XML document from the data which is vailable in Oracle tables at client location.
    Could some body help me on how to get ahead on this.
    Thanks in advance,
    Kumar.

    Implimentation in PowerBuilder7(Source is experimental.. need optimization):
    kml_store = create datastore
    selectblob kml into :kml_result from (select get_kml(:querry_type,:tmp_querry_value,1) as kml from dual) using sqlca;
    if sqlca.sqlcode=100 then
    MessageBox("INFO","No data found");
    return false;
    end if
    if sqlca.sqlcode = -1 then
         MessageBox("INFO","Error in generating KMl file");
         return false
    end if
    li_FileNum = FileOpen("test.kml",StreamMode!, Write!, LockWrite!, Replace!);
    b_len=Len(kml_result)
    b_len=64244;
    /*inserting in file :)*/
    DO WHILE b_pos<=b_len
         s_pipe=String(BlobMid(kml_result,b_pos,i_str_len))
         ret = FileWrite(li_FileNum,s_pipe);
         s_pipe="";
         b_pos=b_pos+i_str_len;
    LOOP
    FileClose(li_FileNum);
    Message was edited by:
    user601564

  • Generating DDL of table from synonym

    Hi All,
    I have synonyms in one schema A, and the original corresponding tables of those synonyms is in other schema B. Both the schema's are in integration server and I have only command prompt mode to work with and I can log in to only Schema A.
    I want to generate the DDL's of those tables in schema B using synonyms in schema A.
    Is this possible ? If yes Please help.
    I am using Oracle 9i.
    Thanks
    -AKJ
    Message was edited by:
    user554502

    The synonym itself won't do you much good.
    But, presumably you have at least select privileges on the real table.
    You can then query meta-data related to that table from the ALL_ views
    Example:
    select * from all_constraints where owner = 'B' and table_name = 'THE_TABLE';
    To get the ddl, check out DBMS_METADATA.GET_DDL (10g)
    select DBMS_METADATA.GET_DDL('TABLE','THE_TABLE') from dual;
    Message was edited by:
    dainge

  • JPA entities to the database generation

    Hi,
    I am trying to create JPA entities in an EJB diagram and then automatically get the tables created in a database schema. I started by creating some entities from the Entity wizard, then added some fields, dragged them into the diagram and added some relationships.
    With that done, I noticed that the tables in the offline database created by the wizard don't get updated with the new fields of the entities (they have only the id and version fields). And I couldn't figure out how to do so.
    Then, I tried to use the option 'Synchronize with database -> Generate to' option in the context menu from the EJB diagram, but its options appear disabled for me.
    Please, tell me if I am doing something wrong or expecting anything that the tool is not able to do for me.
    Thanks for any help.

    Disabling the bind variables produces the following:
    INSERT INTO BIG_NUM (ID, NUM) VALUES (2, 9999999999999999.00)The database still joyfully contains a rounded number:
    SQL> select * from big_num;
                     ID                   NUM
                      2  10000000000000000,00So, no, it's not an issue with the bind variables. I need to examine the JDBC driver but could you tell me how I can find out what Oracle JDBC driver is used by JPA? Or... is it some other JDBC driver (not Oracle, that is)?
    Best regards,
    Bisser
    P.S. We use the following version of TopLink Essentials:
    TopLink, version: Oracle TopLink Essentials - 2.1 (Build b60-fcs (11/17/2008))
    Edited by: bisser on Jan 28, 2009 9:25 AM

  • Javadoc JPA Entities

    I want javadoc to generate table names & column information from jpa annotations, does anyone know of any existing settings for javadoc to produce this? Or perhaps a custom doclet? I haven't had any luck searching for one, closest I've come is finding a project on Google Code that will eventually produce one...

    Captain_Pierce wrote:
    I want javadoc to generate table names & column information from jpa annotations, does anyone know of any existing settings for javadoc to produce this?There are no such settings.

Maybe you are looking for

  • Simple Table Displays OK in Mozilla But Not Showing in IE??

    I'm updating our company website and am looking to add sections to each page with bullet points.  (Note: I am using Dreamweaver CS4 version 10.0.) I tried using the Unordered List feature but for those bullet points that were extremely long, the 2nd

  • Why doesn't my new (refurbished) iMac shut down?

    All my years using Windows there was a little voice in the back of my head saying "if only you'd switch to Apple you wouldn't have to deal with all these weird things that don't quite work".  Now I find that (at least my particular) Apple products sh

  • Resize/Scaling issues

    Hi, I'm having a weird issue with Illustrator CS3. In the past, when I was using the Move(V) tool, it allowed me to resize/rotate objects I had selected. Then one day, that functionality disappeared. So I started using the Free Transform(E) tool to t

  • Creating Guest networks

    I have my airport network set up for our private network how do I add in a guest network

  • Analog inputs

    I am using EIO nodes to read the 4 AI channels on the LM3S8962.  The ADC on the chip is 10-bit converter, correct?  The outputs are U32s.  Are these numbers the actual voltage values on the AI pins, or do these need to be scaled?