Why are no foreign keys generated with inheritance?

I have a very simple ORM strutcure that I am trying to create with JPA, using inheritance. The two tables get created, but there is not PK-FK relational link between them generated. I know they CAN be generated, because I have other relationships (not using inheritance) where it works.
Could someone please look at these listings and tell me what I am doing wrong? Thank you!
I have this property set in persistence.xml:
  <property name="kodo.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=restrict"/>
Here's the base class:
@Entity(name = "Sensor")
@Table(name = "SensorRecord")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "SubType", length = 100)
public abstract class Sensor {
    @Id
    @GeneratedValue
    @Column(name = "RecordId")
    private long recordId;
    //@Basic
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "Timestamp")
    private Date timestamp;
    /* JPA uses a version field in your entity to detect concurrent
       modifications to the same datastore record.
       The version field must be an integral type ( int, Long, etc) or a
       java.sql.Timestamp. You should consider version fields immutable. */
    @Version
    private int version;
Here's the derived class:
@Entity(name = "Altimeter")
@Table(name = "AltimeterRecord")
@DiscriminatorValue("Altimeter")
public class Altimeter extends Sensor {
    @Basic
    @Column(name = "Altitude")
    private int altitude;
And finally, here's the (redundant) orm.xml:
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
    version="1.0">
  <!-- declares the default access type for all entities -->
  <access-type>FIELD</access-type>
  <entity class="navdemo.persistence.Sensor" name="Sensor" access="PROPERTY">
    <table name="SensorRecord"/>
    <inheritance strategy="JOINED"/>
    <discriminator-column name="SubType" length="100" discriminator-type="STRING"/>
    <attributes>
      <id name="recordId">
        <column name="RecordId" column-definition="BIGINT"/>
        <generated-value strategy="AUTO"/>
      </id>
      <temporal value="TIMESTAMP">
        <column name="Timestamp"/>
      </temporal>
      <version name="version"/>
    </attributes>
  </entity>
  <entity class="navdemo.persistence.Altimeter" name="Altimeter" access="PROPERTY">
    <table name="AltimeterRecord"/>
    <discriminator-value>Altimeter</discriminator-value>
    <attributes>
      <basic name="altitude">
         <column name="Altitude"/>
      </basic>
    </attributes>
  </entity>
</entity-mappings>

Hi,
well I suggest to use the InputMap/ActionMap approach.
Something like this should work:
    private void installMyActions() {
        CloseAction closeAction = new CloseAction("closeAction");
        installMyAction(closeAction, KeyStroke.getKeyStroke("ESC"));
    private void installMyAction(AbstractAction action, KeyStroke keyStroke) {
        getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(keyStroke, action.getValue(Action.NAME));
        getActionMap().put(action.getValue(Action.NAME), action);
    class CloseAction extends AbstractAction {
        public CloseAction(String name) {
            super(name);
        public void actionPerformed(ActionEvent e) {
            dialog.setVisible(false);
    }Hope that helps,
Michael

Similar Messages

  • Why are my fields not moving with my Dynamic stamp ? Only the artwork appears

    Why are my fields not moving with my Dynamic stamp ? Only the artwork appears

    Sounds like you're a candidate for Lightroom...based on the time you don't
    want to spend in Photoshop.
    Photoshop install media is likely created in large batches, perhaps in a
    foreign country, so it's understandable that you get Photoshop 11.0.0 is on
    the media.
    I don't know as I would use ProPhotoRGB as my working space in Photoshop.  I
    was merely suggesting that you look at your color settings to make sure
    things were the same on both machines.
    How do you know your actions are the same?  Did you copy the action
    recording from one computer to the other, or did you merely record the same
    steps on each one?  Have you compared the details of each action step in the
    Actions Palette to make sure they are the same?  The symptoms still sound
    like something different than sRGB being the output color-space, or the fact
    it isn't embedded on one or the other of the computers.
    How are you viewing the JPG when it looks the same or different than the
    RAW?  Are you looking at the side-by-side in Photoshop, or side-by-side in
    Bridge, or are you using a mixture of viewers, one Adobe, and one not?  And
    are you using the Canon Codec on Vista or not?  The Canon Codec would be
    showing the camera-preview in the RAW not the RAW adjustments that Adobe has
    done.
    While the OS shouldn't be causing a difference in how the action is run, a
    difference between OSes may make a difference in the processing to show up.
    The camera profile associated with a RAW file is visible in the
    third-from-right tab in ACR over at the right.  The one with the little
    DSLR-camera icon on the tab.
    Can you attach the two JPGs on a reply, here, or if not, upload a ZIP of the
    two JPGs and the RAW to a file-sharing site like http://www.rapidshare.com/
    and post the download link(s)?

  • Why are iCal alarms coming up with a black rectangle?

    Why are iCal alarms coming up with a black rectangle? I'm running 10.3.9 and iCal v. 1.5.2. This started after I did software updates this week.
    iMac   Mac OS X (10.3.9)  

    I solved it in my case by going to System Preferences>Internet & Network>QuickTime>Advanced, then clicking the checkbox to Enable Flash. I also had to quit and restart iCal.
    I think the Quicktime715 update that recently came out had something to do with it.
    It seems that the black box is supposed to be a movie of a vibrating alarm clock, and apparently that movie uses Flash.
    I hope this fix works for you too.

  • Music in library, why are some songs not marked with cloud?

    Music in library, why are some songs not marked with cloud icon?

    Welcome to the Apple Community.
    Where exactly are you looking and what do they look like, there are several iCloud icons used in iTunes.
    Maybe a screenshot.

  • Why are not all photos taken with an iphone available on the icloud, even that i made some fotos at the same time. Some of them are afterwards available on fotostream others not

    Hi,
    why are not all photos taken with an iphone available on the icloud, even that i made some fotos at the same time?
    Some of these photos are afterwards available on fotostream others not.
    Thx
    Markus

    If they are in photos view then they are in an event unless you have a corrupted library
    How are you"merging" the photos?
    most common issue is either bad sort (view menu ==> sort events) or bad camera dates
    select one and show event to see the event
    LN

  • Detect the fields which are primary/foreign keys for each schema's tables

    Hello everybody,
    I'd like to know if it's possible to select a field in one of the dictionary tables to identify the fields of a table which are PK or FK in this one. I'd like to do this to generate the fields that I need to put in a technical design.
    Actually I have this (if it can help you to understand what I'd like to do) :
    select table_name "Table name",
    column_name "Physical field name",
    case when data_type = 'NUMBER' then data_type || '(' || NVL(data_precision,0) || ',' || NVL(data_scale,0) || ')'
    when data_type = 'VARCHAR2' then data_type || '(' || data_length || ')'
    else data_type
    end "Datatype",
    case when nullable = 'Y' then 'FALSE'
    when nullable = 'N' then 'TRUE'
    end "Not null",
    /* Here I'd like to retrieve TRUE or FALSE if the field to display is a primary key or not and the same for foreign keys*/
    from all_tab_columns
    where table_name in (select table_name
    from all_tables
    where table_name like '%project_name%'
    and table_name not like '%TMP%');
    Thanks a lot for your help,
    Florent

    Please investigate all_constraints and all_cons_colums.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm

  • Why are there free fonts included with Adobe Reader?

    I noticed that there is a folder with free Adobe fonts included with Adobe Reader. The fonts are Courier Std, Minion Pro and Myriad Pro.
    Why are these fonts included? Will these fonts be included with future versions of Adobe Reader?

    The fonts are only for use with Adobe Reader. You should not attempt to use them for any other purpose. They are included with software that is free of charge, but still subject to license and may not be copied to other systems...
    All versions of Adobe Reader have included some fonts, but they change.
    They are mainly there to help Adobe Reader show PDF files that do not embed fonts, to generate substitutions in a wide range of sizes and shapes.

  • Why are alpha/numeric keys inoperative on aluminum apple wireless keyboard

    This is a follow on to previous topic that i answered.
    I was able to get my wireless keyboard partially operational.
    It is paired and only partially functionall
    • Alpha numeric keys do not work
    • Delete Key (backward) and fn-Delete (forward) work
    • Arrow keys work
    • Function keys and
    • Mouse keys are working 8 (up), k (down), u (left), o (right), 7 (up diagonal left), l (down diagonal right), j (down diagonal left, 9 (up diagonal right). i is the mouse click.
    i am leaving this up for the benefit of other Wireless Keyboard users.
    THE APPARENT PROBLEM IS IN THE UNIVERSAL ACCESS PREFERENCES.
    I just hit Opt key five times and now the Wireless Keyboard is working very well. The mouse keys are now normal keys for Alpha Numerics. Note i am typing 8, k, u, o, 7, l, j, 9, i. . Now do Opt five times.
    (typed on my USB keyboard) There is a alarm sound when the change over occurs. Now the Alpha Numerics are inoperative and the mouse keys work. Remember that the wireless keyboard does not have a number pad. Therefore; when mouse keys are activated the above alphanumeric keys take the place of number pad 8, 2. 4. 6, 7, 3, 1, 9, and 5.
    Now back to the wireless keyboard. From top to bottom, left to right lower case keys:
    zxcvbnm,./ asdfghjkl;', qwertyuiop[]\ `1234567890-=
    From top to bottom, left to UPPER CASE keys:
    ZXCVBNM,./ ASDFGHJKL:" QWERTYUIOP{}| ~!@#$%^&*()_+
    So i answered my question and leave it for your benefit. One other comment:
    When i first set up the keyboard and spent half a day yesterday thinking i was getting nowhere because the green ON light was out. Chalk that up to what i consider poor documentation which didn't describe normal operating conditions.
    It isn't supposed to light except during initial setup when it flashes. The caps lock key lights when it is pressed SO THAT IS A GOOD INDICATION THE KEYBOARD IS ACTIVE.
    Regards: The General

    General, you are a genius. This happened to me just last week. I racked my brain trying to figure it out. Apple Care had no idea and recommended I exchange my keyboard for a new one, which I did. The problem still persisted. I tried deleting my bluetooth plist and using a USB keyboard which resulted in disaster when I used the number pad and suddenly my mouse no longer worked.
    I scoured the literature looking for some sort of key-lock function and found zip. Apple Care told me to take in the entire CPU. Unsatisfied with that, I researched further and found your thread. I told Apple Care they need to tell Apple to make a note of this in their literature!
    Thanks again!

  • ADF-Master detail-Foreign key generated By Trigger won't propaget to Detail

    Hi All,
    We have Master-Detail Table where Master table key is generated by DB.
    And this key act as Foreign key in detail table.When we Creates Master Table records and commit it .It gets saved correctly But when we navigate to Create Detail record (Cretae button is taken from Detail) It opens in Create mode but does n't poppulate Foreign Key.
    Can anybody plz explain..
    Regards
    Yogesh

    Hi Frank,
    Thanks for your reply.I don't know "the ADF Business Components tester "
    what is this ?
    I was able to solve my problem by making "Refresh after insert " Check box selected in Entity object.Now it is generating Master Key and also i am getting it in Detail.
    But now problem is, Can we make details record in insert mode by 'Create opration' under Master View.My requirment is insert two records in detail table in background while inserting record in master.Where relationship is maintained by foreign key which generated by trigger.
    I want master and detail create form on same page where i will make details from Rendering False i.e both should be in Create mode (Accesser should not retrive record).
    In Short
    ADF-BC Master Detail - Detail Record insert in Back ground on the same page
    Thanks in Adv
    RHY

  • Hello! Why are there staircase-shaped artefacts with jpegs in Lightroom (invisible in other programmes)?

    Hello! Why are there ugly staircase-shaped artefacts with jpegs in Lightroom? They're mostly on edges of red subjects and I can't find them in other programmes or software...

    If you have the photos on your camera cards, then obviously you can simply copy them to the appropriate locations.
    There are Lightroom plug-ins that can retrieve the preview that Lightroom uses, but these will be smaller and lower in quality than the original. Maybe one of our plug-in experts can suggest the proper plug-in.
    If the hard disk is really going bad, as I speculated, you would definitely want to get it replaced. If that is the case, you don't want to keep using it. You might want to run some disk diagnostics on it.

  • Why are my emails printing out with a very small font

    why are all my emails printing out in a very small font? It takes a magnifying glass to read them.
    == This happened ==
    Every time Firefox opened
    == a few weeks ago

    Go to: file menu
    print preview
    check scale (mine was defaulting to 50%)
    change to 100%
    print
    Fix it for me and the scale reset for future printing

  • Why are my podcasts not syncing with Apple TV when all devices connect to the same Apple iD?

    Does anybody have an idea as to why my recently updated Apple TV does not sync my podcasts from my Apple iD. It's supposed to, it's not doing it, and it's very annoying.
    This is only half the aggravation; the other half is that all my podcasts have been deleted automatically twice(no apparent reason other than perhaps a bug in iOS 7.0.2 / 11A501).
    This one I have managed to comeup with sort of a temporary fix while Apple fixes this: I made a copy/backup of the "Podcasts" folder inside the "iTunes Media" which in turn is in the "iTunes" folder Within the "Music" folder in my Mac. When my Podcasts are deleted, I just drag the backup "Podcasts" folder I created into the My Pocasts in iTunes.
    Apple please fix it.

    Does anybody have an idea as to why my recently updated Apple TV does not sync my podcasts from my Apple iD. It's supposed to, it's not doing it, and it's very annoying.
    This is only half the aggravation; the other half is that all my podcasts have been deleted automatically twice(no apparent reason other than perhaps a bug in iOS 7.0.2 / 11A501).
    This one I have managed to comeup with sort of a temporary fix while Apple fixes this: I made a copy/backup of the "Podcasts" folder inside the "iTunes Media" which in turn is in the "iTunes" folder Within the "Music" folder in my Mac. When my Podcasts are deleted, I just drag the backup "Podcasts" folder I created into the My Pocasts in iTunes.
    Apple please fix it.

  • Why are there so many problems with the early 2008 Mac Pro ???

    Hi everybody out there using Mac Pro's early 2008,
    I found out there is a lot of problems with the early 2008 Mac Pro.
    My early 2008 Mac Pro has been repaired ones under warranty and now it stopped working again ! Also see under: Mac Pro early 2008 no chime and does not start up. Why is this ????
    It worked well for about 2 years and then it just fails and i had this failing issue twice already !!! Is this just a BAD Apple product or how do you think I need to approach this. Let’s face it, these machine don’t come cheap and you at least expect them to work without problems for 4-5 years. What is happening here ???
    Cheers, Kavango

    go to a black screen after 15 minutes or a couple hours
    That is probably an indication that you need to find a new graphics card.
    RE: Mac Pro Replacement Graphics cards
    1) Apple brand cards,
    2) "sold in the Apple store" cards, and
    3) "Mac Edition" cards ...
    ... show all the screens, including Boot up screens, Safe Mode, Installer, Recovery, debug screens, and Alt/Option boot screens. At this writing, these choices include:
    1) Apple brand cards:
    • Apple-firmware 5770, about US$250** works near full speed in every model Mac Pro, Drivers in 10.6.5
    • Apple-firmware 5870, about US$450
    2) "sold in the Apple store" cards
    • NVIDIA Quadro 4000, about US$1200
    • NVIDIA Quadro 5000, about US$2500
    3) "Mac Edition" cards -- REQUIRE 10.8.3 or later:
    • SAPPHIRE HD 7950 3GB GDDR5 MAC Edition, about US$480** Vendor recommends Mac Pro 4,1
    • EVGA GTX 680 Mac Edition, about US$600
    The cards above require no more than the provided two 6-pin aux power connectors provided in the Mac Pro through 2012 model. Aux cables may not be provided for third-party cards, but are readily available.
    If you are Meet ALL of these:
    • running 10.8.3 or later AND
    • don't care about "no boot screens" etc AND
    • can re-wire or otherwise "work out" the power cabling, THEN:
    You can use many more cards, even most "PC-only cards"

  • Why are google and youtube inconsistent with encrypted transmission of pages?

    Typically I get the padlock icon when I am on a google or youtube page but sometimes -- particularly recently -- I get the exclamation point with the further message that "the connection to this website is not fully secure because it contains unencrypted elements (such as images)." However, invariably when I refresh the page the padlock icon instead of the exclamation point appears. I don't understand why this happens since nothing otherwise on the page appears to have changed, and yet the refresh switches it from the exclamation point to the padlock icon. I'd appreciate any insight that someone can offer.

    Some pages may have rotating ads to insecure pages, so you may get other links if you refresh the page.
    You can open the Web Console (Firefox/Tools > Web Developer) to check if there are (red) lines with [mixed]to see if that helps to identify the mixed content.

  • Why are nd filters still used with digital?

    I'm kind of new to the world of DSLRs, but it just occurred to me from what I know, that nd filters should really be a thing of the past. I mean nd filters are just there to reduce the amount of light right? This is such a basic thing to do when dealing with digital imaging. Other than holding onto the past, why wouldn't there be a way to set your ISO as low as 1? Or am I just totally missing something? I know some professional digital video cameras like the sony f65 have internal nd filters, but unless that's a software thing, then that also seems a bit silly. Can someone educate me if I'm not understanding.
    Cheers,
    Cg.
    Canon 6D,Canon EF 24-105mm f/4 L IS USM, Sigma 70-200mm f/2.8 EX DG OS HSM, Sigma 1.4 x EX DG Teleconverter, Canon EF 100mm f/2.8 macro USM, Canon EF 50mm f/1.8, EF 40mm f/2.8 pancake, Sigma AF 8-16mm f/4.5-5.6 DC HSM, Pentax 400mm f/5.6

    Many "effects" filters are no longer required as the effects can be applied with digital editing software... so while it's true that many filters are "a thing of the past", ND filters are _not_ actually "effects" filters.  What they do cannot be simulated by editing an image.
    An "good" ND filter wont change the look of the image itself... everything should appear sharp and without any color cast.  What it does... is change your shooting CIRCUMSTANCES.
    Suppose I'm shooting with an outdoor "fill" flash on a sunny day and my flash can't do "high speed sync" mode... so I'm limited to max flash sync shutters speeds of, say, 1/200th (this varies based on your specific camera model.)  The "Sunny 16" rule says that I the normal exposure for full mid-day sun using f/16 is to use the inverse of the ISO as the shutter speed.  So at a low base ISO of ISO 100, that'd be 1/100th.  But the side-effect of f/16 is a _very_ broad depth of field and suppose I want a deliberately blurred background.  I can increase the shutter to 1/200th and this will let me drop my f-stop to f/11... but that's still a LOT of depth of field and no nicely blurred background.  If I wanted to bring that down to, say, f/4... I'd have to find a way to dump 3 full stops worth of light.    I can't just drop the f-stop to f/4 and increase the shutter by 3 stops to 1/1600th because that's WELL beyond flash-sync speed and my flash (for purposes of this example) can't do high-speed sync.  
    One really great way to dump 3 stops of light so I can drop my f-stop down without having to speed up my shutter is... a 3 stop ND filter (sometimes called an ND 0.9 -- every "0.1" worth of density blocks 1/3rd of a stop of light.)
    Another _VERY_ common use of the ND filter is to get shutters speeds much slower than possible without the filter.
    Suppose I want to take a photo of a waterfall and I want a slow shutter so that I can have that gorgeously blurred dreamy looking water.  At f/16 my shutter is still at 1/100th... I could go to f/22 and drop the shutter to 1/50th... but that's still pretty fast.   If I used 5 stops I could get the shutter down to 1/4 second.  A 10 stop ND (ND 3.0) would let me bring that down to 8 seconds... 
    The final images in these examples would still have the same amount of light and there'd be no tint or color-cast on the images... what you're REALLY doing is changing your shooting "circumstances" which allows you to use different exposure settings than would otherwise be possible without the filter.
    Hope that helps!
    Regards,
    Tim
    Tim Campbell
    5D II, 5D III, 60Da

Maybe you are looking for

  • How to Edit a doc when it has been signed?

    I am trying to edit a pdf and it comes up with this error message: "This document has been signed and can not be edited."  I have tried resaving the file but it still comes up with the message. There is no signature currently on the document. Any sug

  • Itunes app won't launch ... Please Help!

    I have been having this problem off and on where iTunes starts launch (IE: does the bounce thing on the dock) but then stops ... the icon is visible and I can force quit the application as if its sunning, but it never launches. I've tried reinstallin

  • REG : the Variable in the query........

    Hi, I changed one attribute to 15 chraracters , variable was created on this attribute in the query  when I run the query with the new value(more than 10 char now) in the  selection condition I am getting the following message "value G57004040190  fo

  • Starting over with iPhoto?

    My library in iPhoto is too large 100,000+ photos. I have tried to split it with Library Manager, but it is too big and after duplicating a part, I can't delete it. I have a backup, but can't seem to find the iPhoto Library to try and re-import the p

  • Is there a Eye Candy 4000 plug in for Fireworks CS5?

    I am in great need of plug ins like the Eye Candy 4000 that was with the Macromedia Fireworks 8 program. If anyone know of where I may locate and download such a set of plug ins please be the grace of the Gods let me know. I am hoping that Adobe Fire