Question about the Glassfish Persistance engine

Goodday,
I am working with Sun Appserver (glassfish v2). And using entity beans to generate my mysql database and work with the data.
Now somting catched my eye the last few days if your using the @OneTOne() method. The persistence engine makes the object a could be null. For instance I have the folowing code:
    @Id
    @GeneratedValue
    @Column(name = "Mandatecode", nullable=false)
    public int getMandatecode() { return Mandatecode; }
    public void setMandatecode(int str) { this.Mandatecode = str; }
    @Column(name = "Projectnaam", length=20, nullable=false)
    public String getProjectnaam() { return Projectnaam; }
    public void setProjectnaam(String str) { this.Projectnaam = str; }
    //This should be true but for testing purpuses its left to false.
    @OneToOne()
    @JoinColumn(name="ProjectType")
    public ProjectSoort getProjecttype () { return projecttype; }
    public void setProjecttype (ProjectSoort ps) { this.projecttype = ps; }It would result in the following table:
Mandatecode
Projectname
ProjectType
But all the collums have may not be null. However I want to ProjectType to be aible to be null in this table. How do I do this?

I'm not sure what you're asking, but a useful resource that may answer your question is the article [Master the New Persistence Paradigm with JPA|http://www.devx.com/Java/Article/33650/], an article which focuses on JPA , MySQL, and MySQL DDL generation.

Similar Messages

  • Re: Question about the Satellite P300-18Z

    Hello everyone,
    I have a couple of questions about the Satellite P300-18Z.
    What "video out" does this laptop have? (DVI, s-video or d-sub)
    Can I link the laptop up to a LCD-TV and watch movies on a resolution of 1080p? (full-HD)
    What is the warranty on this laptop?

    Hello
    According the notebook specification Satellite P300-18Z has follow interfaces:
    DVI - No DVI port available
    HDMI - HDMI-out (HDMI out port available)
    Headphone Jack - External Headphone Jack (Stereo) available
    .link - iLink (Firewire) port available
    Line in Jack - No Line in Jack port available
    Line out Jack - No Line Out Jack available
    Microphone Jack - External Micrphone Jack
    TV-out - port available (S-Video port)
    VGA - VGA (External monitor port RGB port)
    Also you can connect it to your LCD TV using HDMI cable.
    Warranty is country specific and clarifies this with your local dealer but I know that all Toshiba products have 1 year standard warranty and also 1 year international warranty. you can of course expand it.

  • A question about the impact of SQL*PLUS SERVEROUTPUT option on v$sql

    Hello everybody,
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0  Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64I would like to ask a question about the SQL*Plus SET SERVEROUTPUT ON/OFF option and its impact on queries on views such as v$sql and v$session. Here is the problem
    Actually I define three variables in SQL*Plus in order to store sid, serial# and prev_sql_id columns from v$session in order to be able to use them later, several times in different other queries, while I'm still working in the current session.
    So, here is how I proceed
    SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files
    SET SQLBLANKLINES ON;
    VARIABLE mysid NUMBER
    VARIABLE myserial# NUMBER;
    VARIABLE saved_sql_id VARCHAR2(13);
    -- So first I store sid and serial# for the current session
    BEGIN
        SELECT sid, serial# INTO :mysid, :myserial#
        FROM v$session
        WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
    END;
    PL/SQL procedure successfully completed.
    -- Just check to see the result
    SQL> SELECT :mysid, :myserial# FROM DUAL;
        :MYSID :MYSERIAL#
           129   1067
    SQL> Now, let's say that I want to run the following query as the last SQL statement run within my current session
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;According to Oracle® Database Reference 11g Release 2 (11.2) description for v$session
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]
    the column prev_sql_id includes the sql_id of the last sql statement executed for the given sid and serial# which in the case of my example, it will be the above mentioned SELECT query on the employees table. As a result, right after the SELECT statement on the employees table I run the following
    BEGIN
        SELECT prev_sql_id INTO :saved_sql_id
        FROM v$session
        WHERE sid = :mysid AND serial# = :myserial#;
    END;
    PL/SQL procedure successfully completed.
    SQL> SELECT :saved_sql_id FROM DUAL;
    :SAVED_SQL_ID
    9babjv8yq8ru3
    SQL> Having the value of sql_id, I'm supposed to find all information about cursor(s) for my SELECT statement and also its sql_text value in v$sql. Yet here is what I get when I query v$sql upon the stored sql_id
    SELECT child_number, sql_id, sql_text
    FROM v$sql
    WHERE sql_id = :saved_sql_id;
    CHILD_NUMBER   SQL_ID          SQL_TEXT
    0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;Therefore instead of
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;for the value of sql_text I get the following value
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);Which is not of course what I was expecting to find in v$sql for the given sql_id.
    After a bit googling I found the following thread on the OTN forum where it had been suggested (well I think maybe not exactly for the same problem) to turn off SERVEROUTPUT.
    Problem with dbms_xplan.display_cursor
    This was precisely what I did
    SET SERVEROUTPUT OFFafter that I repeated the whole procedure and this time everything worked pretty well as expected. I checked SQL*Plus documentation for SERVEROUTPUT
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Could anyone kindly make some clarification?
    thanks in advance,
    Regards,
    Dariyoosh

    >
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Hi Dariyoosh,
    SET SERVEROUTPUT ON has the effect of executing dbms_output.get_lines after each and every statement. Not only related to system view.
    Here below what Tom Kyte is explaining in this page:
    Now, sqlplus sees this functionality and says "hey, would not it be nice for me to dump this buffer to screen for the user?". So, they added the SQLPlus command "set serveroutput on" which does two things
    1) it tells SQLPLUS you would like it <b>to execute dbms_output.get_lines after each and every statement</b>. You would like it to do this network rounding after each call. You would like this extra overhead to take place (think of an install script with hundreds/thousands of statements to be executed -- perhaps, just perhaps you don't want this extra call after every call)
    2) SQLPLUS automatically calls the dbms_output API "enable" to turn on the buffering that happens in the package.Regards.
    Al

  • Questions about the Apple Developer Enterprise Program

    Hi there,
    i got some questions about the Apple Developer Enterprise Program:
    - is there a way a company can create their own "AppStore" with only the APPs the employees should use?
    - when I developed the enterprise app are the install files on a apple hosted server or do i need my own infrastructure to distribute my app?
    Thanks in advance for answers!

    Google: MDM

  • Some questions about the integration between BIEE and EBS

    Hi, dear,
    I'm a new bie of BIEE. In these days, have a look about BIEE architecture and the BIEE components. In the next project, there are some work about BIEE development based on EBS application. I have some questions about the integration :
    1) generally, is the BIEE database and application server decentralized with EBS database and application? Both BIEE 10g and 11g version can be integrated with EBS R12?
    2) In BIEE administrator tool, the first step is to create physical tables. if the source appliation is EBS, is it still needed to create the physical tables?
    3) if the physical tables creation is needed, how to complete the data transfer from the EBS source tables to BIEE physical tables? which ETL tool is prefer for most developers? warehouse builder or Oracle Data Integration?
    4) During data transfer phase, if there are many many large volume data needs to transfer, how to keep the completeness? for example, it needs to transfer 1 million rows from source database to BIEE physical tables, when 50%is completed, the users try to open the BIEE report, can they see the new 50% data on the reports? is there some transaction control in ETL phase?
    could anyone give some guide for me? I'm very appreciated if you can also give any other information.
    Thanks in advance.

    1) generally, is the BIEE database and application server decentralized with EBS database and application? Both BIEE 10g and 11g version can be integrated with EBS R12?You, shud consider OBI Application here which uses OBIEE as a reporting tool with different pre-built modules. Both 10g & 11g comes with different versions of BI apps which supports sources like Siebel CRM, EBS, Peoplesoft, JD Edwards etc..
    2) In BIEE administrator tool, the first step is to create physical tables. if the source appliation is EBS, is it still needed to create the physical tables?Its independent of any soure. This is OBIEE modeling to create RPD with all the layers. If you build it from scratch then you will require to create all the layers else if BI Apps is used then you will get pre-built RPD along with other pre-built components.
    3) if the physical tables creation is needed, how to complete the data transfer from the EBS source tables to BIEE physical tables? which ETL tool is prefer for most developers? warehouse builder or Oracle Data Integration?BI apps comes with pre-built ETL mapping to use with the tools majorly with Informatica. Only BI Apps 7.9.5.2 comes with ODI but oracle has plans to have only ODI for any further releases.
    4) During data transfer phase, if there are many many large volume data needs to transfer, how to keep the completeness? for example, it needs to transfer 1 million rows from source database to BIEE physical tables, when 50%is completed, the users try to open the BIEE report, can they see the new 50% data on the reports? is there some transaction control in ETL phase?User will still see old data because its good to turn on Cache and purge it after every load.
    Refer..http://www.oracle.com/us/solutions/ent-performance-bi/bi-applications-066544.html
    and many more docs on google
    Hope this helps

  • Two questions about the new iWeb

    Hi
    I've got two questions about the new iWeb.
    1. Is it possible to blog online now? Meaning adding a new blog entry without having to be on your own Mac? This is a feature I've been waiting for since iWeb first was released.
    2. Is it possible to choose the format of images? Earlier editions had the option to "optimize" images but that meant it changed it into .png meaning the site got a lot heavier than if .jpg was used. And since I have relatives who still only have an isdn connection I need to be able to have the website as light as possible.
    thanks

    Ah well... thanks for the quick answer
    Message was edited by: Guðlogi

  • Question about the sensor... just got my 4s yesterday after screwing up my 3 with the laterd version update.  EVery call I have been on has either changed to speaker, called another number or ended the call or activated facetime, which I have turned off.

    Question about the sensor... just got my 4s yesterday after screwing up my 3 with the laterd version update. EVery call I have been on has either changed to speaker, called another number or ended the call or activated facetime, which I have turned off. never had this trouble with my 3...I don't even want to talk to anyone on this phone! Is the sensor bad? That is what the AT&t rep suggested.

    Restore as new... if the problem still continues then there is a hardware issue.
    If it stops after a restore as new, then the issue is with the backup the device is currently setup with.

  • Question about the DB adapter

    Question about the DB adapter
    ns2006.0.7
    Question:
    It seems that we can only have 1 db adapter, but in the adapter defiition we have to specify the database.  If I want to communicate to several different databases on different platforms, Oracle / SQL I need to install a DB adapter for each database connection. 
    I can't figure out how to add a second DB adapter, does anyone know how?
    Thank you
    Daniel
    Safeway Inc.

    Hi
    We're new at developing our own agents etc. We've leveraged the supplied DB agent and written the relevant adapter, however we're struggling with the transformation.
    Could I be cheeky and ask if anyone would be willing to share a transformation they have written for the DB adapter? Unfortunately no-one in our team has had past XML experience, so we're trying to backwards engineer from examples.
    Thanks, Meghan

  • Question about the ability of Genius Bar to help with outside software...

    Hi I wasn't sure where to put this, but here's my question. I'm having a problem with the Sims 2 on my Macbook and I was wondering if I go to the Genius Bar will they be able to help me or are they strictly hands off when it's not a direct Apple product?
    Also, I bought an external hard drive in the Apple Store but it's not an Apple branded product. If I'm having a problem with that, can I go to the Apple Store?

    If it's a question about the installation, system requirements or compatibility with your MacBook, the Mac Genius can probably help. If you're having some kind of issue while using the Sims 2, you'll probably have to contact .
    The same is true with the hard drive. If you need some help getting it connected or even formatted, they can probably help. However, if it's not powering up or you're losing files or some kind of operational issue with the hard drive after it's connected, they'll probably refer you to the manufacturer.
    Usually Apple can't support other vendors' products. Someone here may be able to give you some more advice, since none of us work for Apple. There may be someone here who's already had the same issue with the Sims.
    -Doug

  • Question about the programming of a legend

    Hello everybody,
    I have a question about the programming of a waveform's legend. I
    already asked here in this forum about the legend programming (03)
    months ago.
    I went satisfied but I ve just noticed that this code
    (See Code old_legend_test.llb with main.vi as main function) operates a
    little different from my expectances.
    Therefore I have a new question and I want to know if it
    is possible by labview programming to plot and show, on a waveform
    chart, a signal with activ plot superior to zero (0) without to be
    obliged to plot and show a signal with activ plot equal to zero (0) or
    inferior to the desired activ plot.
    I give you an example
    of what I m meaning. I have by example 4 signals (Signal 0, 1, 2 and 3)
    and each signal corresponds respectively to a channel (Chan1, Chan2,
    Chan3, Chan4). I want to control the legend (activ plot, plot name and
    plot color) programmatically. Is it possible with labview to plot signal
    1 or 2 or 3 or (1, 3) or (2,3) or (1,2,3) or other possible combination
    without to active the signal with the corresponding activ plot zero
    (0)?
    Let see the labview attached data
    (new_legend_test.llb with main.vi as main function). When I try to
    control the input selected values again I get them back but I don't
    understand why they have no effect on the legend of my waveform chart.
    Could somebody explain me what I m doing wrong or show me how to get a
    correct legend with desired plots? Thank by advance for your assistance.
    N.B.
    The
    both attached data are saved with labview 2009.
    Sincerly,PrinceJack
    Attachments:
    old_legend_test.llb ‏65 KB
    new_legend_test.llb ‏65 KB

    Hi
    princejack,
    Thanks for
    posting on National Instruments forum.
    The behavior
    you have is completely normal. You can control the number of row displayed in
    the legend and this rows are linked to the data you send to your graph. Thus,
    if you have 3 arrays of data, let say chan1, chan2 and chan3, you can choose
    which data you want to display in your graph using the property node (Active
    plot and visible). But for the legend as you send 3 plots there is an array of
    the plot name [chan1, chan2, chan3] and you can display 0, 1, 2 or 3 rows of
    this array but you cannot control the order in this array! So, to be able to
    change this array you have to only send data you need to you graph. I'm not
    sure my explanations are clear so I have implemented a simple example doing
    that.
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/
    Attachments:
    GraphLegend.vi ‏85 KB

  • I want to question about the official service at the service center of Sony.

    I want to question about the official service at the service center of Sony.
    long since I like the models and items sony. from start playstation, cameras, camcorders up, I've ever had. and a new camera that I bought two years ie compact cameras Sony Cybershot DSC H200. as of a month ago, a camera was having problems in lenses that would not close. and setting the automatic mode to move by itself. I came to the Sony Service Center in Makassar, precisely on Jl. Shop Pengayomann A5 / 05 (0411) 442340.
    operator initially said only two weeks to work on my camera. but this week has been more dau even want to go in a month tomorrow, dated July 9, no news from the service center. and I kept the call to the office service. as well as assorted reasons. there are no spare parts or technical constraints, and the last one I call to his office, he said the factory spare part is damaged. imported directly from Singapore. I think, ko new spare part it can be damaged before using that? how the quality of this Sony spare part? ugly? not good? why?
    I was disappointed with this situation, where soon it will Eid, want to return home as well to Java. but the camera has not been settled workmanship?
    nah, roughly what is the solution of the Sony plagued with this problem? please help, because he did not know to whom to complain. operator had just said: it's up to the father alone.
    once again I asked for his help. solution. if you can before Eid arrived.
    Thank you,
    AD. Rusmianto

    Hi awwee107, 
    Welcome to the Sony Community! 
    We have forwarded your query to the relevant team for their further assistance and someone from local CC will contact you.
    Thanks!
     

  • Question about the notification center (Mails and Reminders)

    Hello together,
    I just started using Mountain Lion and now I have some few questions about the notification center.
    1. Is it possible to show all reminds in the notification center? I have a lot of reminds without an date / time and they don't appear in the notification center.
    2. Is it possible to show the last five Mails in the notification center? I'm just seeing new incoming mails, but I would prefer it, if I could see the last five mails
         (no matter if readed or unreaded).
    Thank you very much for you help.
    Ratte1988       
    Hallo zusammen,
    ich habe gerade damit begonnen Mountain Lion zu verweden und habe einige Fragen zur Mitteilungszentrale.
    1. Ist es möglich alle Erinnerungen in der Zentrale anzuzeigen? Ich habe viele Erinnerungen, die ohne Datum / Uhrzeit sind und in der Mitteilungszentrale
         daher nicht auftauchen.
    2. Ist es möglich, sich die letzten fünf Mails in der Zentrale anzeigen zu lassen? Ich sehe nur neue ungelesene Mails, würde es aber vorziehen die letzten
         fünf Mails sehen zu können (egal ob gelesen oder ungelesen.)
    Danke für eure Hilfe.
    Ratte1988

    Only reminders with dates appear in the notification center - undated ones don't. Once an email has been read, it is removed from the notification center. Apple has a feedback center where you can offer suggestions.

  • The question about the sharepoint server 2010 install

    Hi Friends,
    i have a question about the sharepoint server 2010 install. 
    my computer is used the windows server 2008 service pack 1. in order to install the sharepoint 2010 server, i need to choose to windows server 2008 service pack 2. my question is when i install the windows server 2008 service pack 2,whether the inside
    of my computer  information will be lost or change? 
    thank you in advance. 
    Qearl

    Hi ,
    No data will be lost either from your Windows program files or other drives as long as it is an upgrade.
    After upgrade you will still be able to see your old program files under windows.ol folder in the C: Drive of the new OS.
    The data will be lost only when you perform a clean install like complete formatting the HArd disk and installing from scratch.
    As mentioned it always good to maintain a backup preferable important files in a skydrive as there is a good chance of external drives crashing.

  • Question about the chain step name in DEFINE_CHAIN_STEP

    I have questions about the chain step name in DEFINE_CHAIN_STEP:
    1. Can the step name be a number (e.g. "8")?
    2. Should the step name be unique within a chain or across all chains?
    I am having this exception:
    ORA-25448: rule DMUSER.RULE_6_3707 has errors
    ORA-22806: not an object or REF
    After I changed the step names (in DEFINE_CHAIN_STEP), the chain seems to run fine.
    Thanks,
    Denny

    The reason I asked about the step name is to confirm it can handle numbers (it looks it can handle it from the doc).
    Why I changed the step names say from "11" to "21", the error goes away, that puzzled me. Because the way I defined steps and the rules for the steps were exactly the same. Just changing the step names made the error goes away?!
    Thanks.

  • Some question about the renegotiation function in SRM Contract (GOA)

    Hi All Expert,
    We are on SRM 5/4.6,  there is a question about the renegotiation function in SRM GOA.
    Can we renegotiate the price for some parts in the GOA items with this function ( e.g. Only renegotiate one item in the contract) ?
    Will the item price updated automatically after the renegotiation?
    Many thanks in advance!!!
        Wendrin

    Hi Sanjeev,
    Many thanks for your help.
    One more question, if I add a new item when we renegotiation, will it be transfered to contract and create a new item after that?
    Thanks and best regards
    Wendrin

Maybe you are looking for

  • Submit by email function on adobe reader

    I'm trying to apply for a job using an online application on the company's website. The company uses adobe reader. After filling out all the information I click on the submit by email button and get a message saying, "please on enter numerical data f

  • My konsole stopped working in kde

    I did a fresh system install the other day and everything went fine and was up and running. I've been using kde 3.2 with no problems until a few minutes ago. I opened the konsole and the cursor stays in the upper left corner (no bash prompt) and it d

  • Scrollbar Style in CSS

    Hey I'm in a digital arts class and I'm currently working on a portfolio for all my work. My layout is mostly black so I was trying to edit the CSS to change the colors of the scrollbar to black and white. However, whenever I preview it in Firefox or

  • How do I get variable selections in output when I send the output to Export

    Hi Friends, I am working in Web Analyzer and I would like to export the values of the variable selection to excel along with the output for future reference to know this data belongs to mentioned variable selections. Is there any setting in BI to get

  • Disable the windows key?

    Task manager can easily be disabled by changing a registry value.  I also need to lock out the Windows keys.  Since NI claims that LabVIEW is Part 11 compliant, I would have assumed that this function would be standard but I digress. I have found the