Rectangle 27 2

The problem is in the relation between your xml mapping and your Java code.

<one-to-one class="pojo.PM" name="name_pm" />

there needs to be a field named "name_pm" in your Country POJO.

You don't have such a field.

If your Country class has a field for the corresponding PM object, that field's name should be used here.

What I would probably do with your code is to add a field to country and use its name in the mapping.

public class Country {
    private int c_id;
    private String name_c;
    private PM c_pm;

    public int getC_id() {
        return c_id;
    }

    public void setC_id(int c_id) {
        this.c_id = c_id;
    }

    public String getName_c() {
        return name_c;
    }

    public void setName_c(String name_c) {
        this.name_c = name_c;
    }

    public PM getC_pm() {
        return c_pm;
    }

    public void setC_pm(PM c_PM) {
        this.c_pm = c_pm;
    }

}
<class name="pojo.Country" table="country">
      <id name="c_id">
          <generator class="increment" />
      </id>
      <property name="name_c" />
      <one-to-one class="pojo.PM" name="c_pm" />
</class>

I haven't tested any of this, and I'm not sure of exactly how the mapping should be done with a shared primary key. If anyone else feels like providing a tested version, I'll happily upvote another answer or let this one turn "community wiki".

I didn't understand, except that I need name_pm to eliminate exception. Can you please explain, how one-to-one mapping is done

This might be a silly question..but really, how can I test/know if it is a one-to-one mapping ?

java - The concept for one-to-one mapping. Explain the mapping - Stack...

java hibernate java-ee hibernate-mapping
Rectangle 27 8

If you are trying to have a relation between a entity and a Collection or a List of java objects (for example Long type), it would like something like this:

@ElementCollection(fetch = FetchType.EAGER)
    public List<Long> ids;

in many cases, you really don't want to do that. You loose all the benefits of lazy loading here

java - Solve "failed to lazily initialize a collection of role" except...

java spring hibernate jsp spring-mvc
Rectangle 27 7

CDI is a superset of JSF's managed beans, and JSF will eventually deprecate their own native managed bean system. In JSF 2.2 steps have already been taken for this.

CDI is not a superset of EJB beans, but they complement each other. CDI does not only provide more advanced DI to EJB beans, but is also capable of giving EJB beans a scope (mostly used for stateful beans). EJB on its turn provides transactional and security services among others , which CDI does not offer. Like JSF managed beans, EJB beans will eventually be merged into the CDI component model. Marina Vatkina (EJB spec lead) among others has strongly hinted at this.

dependency injection - Purpose of CDI technology in Java EE and its re...

jsf dependency-injection ejb cdi
Rectangle 27 141

You're a little confused about how Visual Studio works with C++ files, but that's OK, since the documentation is lousy. First things first: unlike with C# or Java, the arrangement of files in the project has no relation to the arrangement of files on your disk. Files and folders aren't "in" the project, really; the project only lists the names and paths of the files and folders, which have to already exist on your disk.

In general, you create the layout of folders, with source files inside of those folders. You do this outside of Visual Studio. You also create a project file. When you "add a file" to the project, all you do is tell the project where to find the file on disk.

Let's work with a specific example and I'll show you how I would organize it. Suppose you are making a graphing calculator program called SuperCalc. You'll have a Source folder, and then create folders inside of Source to hold the different files. Suppose the folders you create are:

SuperCalc\Source\Input
SuperCalc\Source\Math
SuperCalc\Source\Math\Matrix
SuperCalc\Source\Output

You have 3 subdirectories of Source: Input, Output, and Math. The Math subdirectory has a subdirectory called Matrix. You'll have .cpp files in Input, Math, Matrix, and Output. You'll create these directories (folders) using Windows Explorer or the Command Prompt.

Now you will also want to create a solution file (SuperCalc.sln) and a project file (SuperCalc.vcxproj & SuperCalc.vcxproj.filters). Do that inside of Visual Studio. Usually the project file lives in a sub-folder of the solution directory; this will be done automatically for you by Visual Studio. Pick a location for the solution file -- it should be somewhere in the same directory structure (folder tree) as the source code. I would suggest putting it next to the Source directory, in:

SuperCalc\Build

Go into VS and pick File > New > Project > Visual Studio Solutions > Blank Solution File. Give the solution a name (maybe "SuperCalc") and a location (the location we just picked in the SuperCalc\Build directory). It will create the solution file for you.

Now right-click on the solution in the Solution Explorer ("Solution SuperCalc, 0 projects"), and pick Add > New Project. Pick a name -- this will be the name of your program executable, like "SuperCalc"! Choose Win32, either Win32 Console Application (this is a DOS-console program) or Win32 Project (this is an ordinary Windows GUI program). Usually I then click on Application Settings to make some important changes: for one thing, I pick Empty Project because I don't want Visual Studio creating files and code for me unless I tell it to. When it's all set up the way I want it, I click FINISH.

Now you've got your solution file and project, created by Visual Studio. You also have your source code, or at least the directory structure (folder tree) where your source code will be, created outside of Visual Studio. It's time to connect the two things together.

If you wanted, you could list all your source files into the Source Files filter of your project. Even though they will come from different directories (Input, Matrix, etc.), there's no required relationship between the locations of the files on disk and their appearance in the project. But if you have a lot of files, it is easier if you create "sub-filters", filters inside the Source Files filter, and give them the names of the sub-folders of Source. That way, you replicate the structure of your disk directories inside of your project file.

Right-click on the Source Files filter of the "SuperCalc" project, and pick Add > Add New Filter. Give it the name Input (the first of the SuperCalc\Source directories). Also create the filters Math and Output. Right-click on the Math filter and pick Add > Add New Filter, to create a sub-filter called Matrix (inside of Math). Now you have these filters:

which parallels the directories (folders) you created earlier. This is purely a convenient arrangement for humans. Visual Studio doesn't understand anything special about it. If you just tell VS to "add a file" it won't put the file in the correct filter. You'll have to tell it where to put it.

To add or create your .cpp files, select the filter name corresponding to the directory where the .cpp file is. So, to add or create a file SuperCalc\Source\Math\Matrix\matrix_multiply.cpp, right-click on the Matrix filter in Solution Explorer, and pick Add > Add New File or Add Existing File. (Add Existing File is for when you have already written matrix_multiply.cpp and you just want to tell the project where it is.) Use the dialog box to navigate to the Source\Math\Matrix directory. Repeat this process for all the source files in your whole program.

You also had the question "is there something similar to $(CURDIR) that I could use to include the source file folder without needing an absolute path?" You are in luck: Visual Studio projects don't use absolute paths! They use relative paths. The project file stores the relative path required to get from the directory containing the .vcxproj file to the directory containing the source file. So if you created SuperCalc.sln and SuperCalc.vcxproj where I suggested (the SuperCalc\Build directory), and you add your .cpp files in the source subdirectories, you can go look inside the SuperCalc.vcxproj file using Notepad, and you'll see lines like:

Since there are no absolute paths, you could take the entire SuperCalc directory tree and move it somewhere else, and it would all still work. No need for environment variable hacks like $(CURDIR).

One final thing to know: since you are putting your source files in multiple directories, you might have problems with #includeing headers, the .h or .hpp files. You must tell the compiler the directories where your header files are located. They will probably be scattered among multiple directories. So edit the project settings: right-click on the project name in Solution Explorer, choose Properties, and drill down to Configuration Properties > C/C++ > General. The first field in the property sheet says "Additional Include Directories". Before you do anything else, click on the Configuration drop-down menu and choose All Configurations. If you have both a 32-bit and 64-bit build, click on the Platform drop-down menu and choose All Platforms. Now go to the "Additional Include Directories" and add all the paths to all the source directories, with the paths specified relative to the project file's directory. So for the SuperCalc example, it would look like:

Once this change is made, a file like Source\Math\Matrix\matrix_multiply.cpp can have a line

#include "input_configuration.hpp"

to #include a file from the Input directory, and it will All Just Work.

(If it doesn't All Just Work, the usual approach is to go back into Project Properties and fiddle with the number of ..\ sequences in front of your Additional Include Directories. Remember that every time you go to make a change you must choose All Configurations again -- otherwise your changes will only apply to the current Configuration (Debug or Release). That setting is not sticky.)

Also, you can define user macros eg. $(source) via a property sheet (.props). I recommend making as many project settings in property sheets as possible since many projects might share settings.

Nice answer. I create filters that match my directory structure, but I run into a recurrent headache, which you touched on a bit. VS has no idea that my filters are linked to directories. This becomes a pain when I add code in sequence: foo.h, foo.c, bar.h, bar.c. I have to remember to keep changing the directory to the right place. VC++ remembers your last directory, so it is always one step behind. I posted a suggestion to MS to allow associating directories with filters. It is here. Please upvote that suggestion if this bugs you too. tinyurl.com/bud4zsv

Sweet! In 2015 community, an empty solution is under new > project ... > other project types > visual studio solutions > blank solution

visual studio - VC2010 C++ - organizing source files - Stack Overflow

visual-studio visual-studio-2010
Rectangle 27 3

Composition is a special case of aggregation

Example: A class contains students. A student cannot exist without a class. There exists composition between class and students.

Code reuse is also best achieved by aggregation when there is no is a Relation ship

Inheritance is a Parent Child Relationship Inheritance Means Is A RelationShip

Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.

Using inheritance in Java 1 Code Reusability. 2 Add Extra Feature in Child Class as well as Method Overriding (so runtime polymorphism can be achieved).

java - Difference between Inheritance and Composition - Stack Overflow

java oop inheritance composition
Rectangle 27 3

Composition is a special case of aggregation

Example: A class contains students. A student cannot exist without a class. There exists composition between class and students.

Code reuse is also best achieved by aggregation when there is no is a Relation ship

Inheritance is a Parent Child Relationship Inheritance Means Is A RelationShip

Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.

Using inheritance in Java 1 Code Reusability. 2 Add Extra Feature in Child Class as well as Method Overriding (so runtime polymorphism can be achieved).

java - Difference between Inheritance and Composition - Stack Overflow

java oop inheritance composition
Rectangle 27 3

By overriding we can create a polymorphic nature depending on the object type. Static method has no relation with object. So java can not support static method overriding.

Why doesn't Java allow overriding of static methods? - Stack Overflow

java static override static-methods
Rectangle 27 2

By overriding we can create a polymorphic nature depending on the object type. Static method has no relation with object. So java can not support static method overriding.

Why doesn't Java allow overriding of static methods? - Stack Overflow

java static override static-methods
Rectangle 27 2

By overriding we can create a polymorphic nature depending on the object type. Static method has no relation with object. So java can not support static method overriding.

Why doesn't Java allow overriding of static methods? - Stack Overflow

java static override static-methods
Rectangle 27 2

By overriding we can create a polymorphic nature depending on the object type. Static method has no relation with object. So java can not support static method overriding.

Why doesn't Java allow overriding of static methods? - Stack Overflow

java static override static-methods
Rectangle 27 3

First, CDI is a dependency-injection standard framework. It defines ways for objects to obtain their dependencies not through instantiation (private FooDao dao = new FooDao()) but via a container which creates and manages instances. You can read more about dependency injection (google/wiki).

The standard defines how that works with both JSF and EJB.

  • your JSF managed beans can be defined via CDI, so that you can inject services into the managed beans, and so that CDI manages the lifecycle of JSF managed beans
  • EJB can also benefit from the advanced dependency injection of CDI (previously they had their own, feature-poor DI).

In short, CDI binds all components in JavaEE in a way spring does with all of its components, but CDI is a standard.

dependency injection - Purpose of CDI technology in Java EE and its re...

jsf dependency-injection ejb cdi
Rectangle 27 99

I want to understand the lock each transaction isolation takes on the table

For example, you have 3 concurrent process A, B and C. A starts a transaction, writes data and commit/rollback (depending on results). B just executes a SELECT statement to read data. C reads and updates data. All these process work on same table T.

  • READ UNCOMMITTED - no lock on table. You can read data in the table while writing on it. This means, A writes data (uncommited) and B can read this uncommited data and use it (for any purpose). If A executes a rollback, B still has read the data and used it. This is the fastest but most insecure way to work with data since can lead to data holes in not physically related tables (yes, two tables can be logically but not physically related in real world apps =\).
  • READ COMMITTED - lock on committed data. You can read the data that was only commited. This means, A writes data and B can't read the data saved by A until A executes a commit. The problem here is that C can update data that was read and used on B and B client won't have the updated data.
  • REPEATABLE READ - lock on block of sql(which is selected by using select query). This means, B reads the data under some condition i.e. WHERE aField > 10 AND aField < 20, A inserts data where aField value is between 10 and 20, then B reads the data again and get a different result.
  • SERIALIZABLE - lock on full table(on which Select query is fired). This means, B reads the data and no other transaction can modify the data on the table. This is the most secure but slowest way to work with data. Also, since a simple read operation locks the table, this can lead to heavy problems on production: imagine that T table is an Invoice table, user X wants to know the invoices of the day and user Y wants to create a new invoice, so while X executes the read of the invoices, Y can't add a new invoice (and when it's about money, people get really mad, specially the bosses).
Connection#setTransactionIsolation
<property name="hibernate.connection.isolation">2</property>

By the way, you can set the isolation level on RDBMS as well:

SET ISOLATION TO DIRTY READ

and on and on...

docs.oracle.com/cd/B12037_01/server.101/b10743/consist.htm Just to add for Oracle : One can set the isolation level of a transaction by using one of these statements at the beginning of a transaction: SET TRANSACTION ISOLATION LEVEL READ COMMITTED; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; SET TRANSACTION READ ONLY;

Moreover, to save the networking and processing cost of beginning each transaction with a SET TRANSACTION statement, you can use the ALTER SESSION statement to set the transaction isolation level for all subsequent transactions : ALTER SESSION SET ISOLATION_LEVEL SERIALIZABLE; ALTER SESSION SET ISOLATION_LEVEL READ COMMITTED;

Regarding REPEATABLE READ - I think a better example to demonstrate it is as follows: B starts a transaction, read data on block of sql WHERE aField > 10 AND aField < 20, that data is locked until transaction ends. A tries to update that data but waits because of the lock. Now when B will read that data again in that same transaction it's guaranteed to read the same data, because it's locked. Correct me if I'm wrong.

@LuiggiMendoza As general concept, isolation levels are just about Dirty Read, Non-Repeatable Read and Phantom Rows. Locks (S2PL) or MVCC are implementations for different vendors.

@LuiggiMendoza - I wasn't accurate, it should be like this - the data that B read is not changed, but consequent selects made by B could return more rows. That's because A cannot modify rows that B already read, until A releases them. However A can insert new rows that qualify the where condition (and therefore next time A will execute a select it'll get a different result with more rows - a phantom read).

java - Transaction isolation levels relation with locks on table - Sta...

java transactions isolation-level
Rectangle 27 9

One reason is that equals() is very hard to get right when sub-typing is involved. See How to Write an Equality Method in Java. Specifically "Pitfall #4: Failing to define equals as an equivalence relation". In essence: to get equality right under sub-typing, you need a double dispatch.

@Oliver: Yes it does. But this is exactly the double dispatch I was talking about.

oop - Why avoid subtyping? - Stack Overflow

oop scala programming-languages functional-programming
Rectangle 27 14

If your code calls FacesContext, it will not work outside a thread associated with a JSF request lifecycle. A FacesContext object is created for every request and disposed at the end of the request. The reason you can fetch it via a static call is because it is set to a ThreadLocal at the start of the request. The lifecycle of a FacesContext bears no relation to that of a ServletContext.

Maybe this isn't enough (it sounds like you've already been down this route), but you should be able to use a ServletContextListener to do what you want. Just make sure that any calls to the FacesContext are kept in the JSP's request thread.

<listener>
    <listener-class>appobj.MyApplicationContextListener</listener-class>
</listener>
public class MyApplicationContextListener implements ServletContextListener {

    private static final String FOO = "foo";

    public void contextInitialized(ServletContextEvent event) {
        MyObject myObject = new MyObject();
        event.getServletContext().setAttribute(FOO, myObject);
    }

    public void contextDestroyed(ServletContextEvent event) {
        MyObject myObject = (MyObject) event.getServletContext().getAttribute(
                FOO);
        try {
            event.getServletContext().removeAttribute(FOO);
        } finally {
            myObject.dispose();
        }
    }

}

You can address this object via the JSF application scope (or just directly if no other variable exists with the same name):

<f:view>
    <h:outputText value="#{applicationScope.foo.value}" />
    <h:outputText value="#{foo.value}" />
</f:view>

If you wish to retrieve the object in a JSF managed bean, you can get it from the ExternalContext:

FacesContext.getCurrentInstance()
            .getExternalContext().getApplicationMap().get("foo");

This ended up working out - I was missing the "setAttribute" bit to make it accessible in the JSF code. Thanks!

java - JSF initialize application-scope bean when context initialized ...

java jsf
Rectangle 27 26

It's not two competing mechanisms - a JPanel is a Container (just look at the class hierarchy at the top of the JPanel javadocs). JFrame.getContentPane() just returns a Container to place the Components that you want to display in the JFrame. Internally, it's using a JPanel (by default - you can change this by calling setContentPane()) As for why it's returning a Container instead of a JPanel - it's because you should program to an interface, not an implementation - at that level, all that you need to care about is that you can add Components to something - and even though Container is a class rather than an interface - it provides the interface needed to do exactly that.

As for why both JFrame.add() and JFrame.getContentPane().add() both do the same thing - JFrame.add() is overridden to call JFrame.getContentPane().add(). This wasn't always the case - pre-JDK 1.5 you always had to specify JFrame.getContentPane().add() explicitly and JFrame.add() threw a RuntimeException if you called it, but due to many complaints, this was changed in JDK 1.5 to do what you'd expect.

@Nate, what do you mean by " Internally, it's using a JPanel". You mean that Container is using a JPanel? What do you mean by that? I though that JPanel is a subclass of Container. And what can I change by "setContentPane"? OK. You say that Container is a class (and I always considered Container as a class). But JPane is also a class. Why we cannot use just JPane or just Container? I was able to do the same things by using only JPane. I was also able to do the same using only Containers.

JFrame is internally using a JPanel object to back the getContentPane() method. This is why Zachary's answer works. The actual JPanel reference is buried in the JFrame.rootPane field. You would call setContentPane() on the JFrame - for example, you could change line 10 in your first example from frame.add(panel) to frame.setContentPane(panel). Container is a class. JPanel is a class (which is a subclass of Container). You're confusing the type of the reference with the type of the object the reference references. Think about Container container = new JPanel()

@Lucio Thanks! Changed the link to a question here on StackOverflow about the same thing.

java - What is the relation between ContentPane and JPanel? - Stack Ov...

java swing user-interface jframe jpanel
Rectangle 27 26

It's not two competing mechanisms - a JPanel is a Container (just look at the class hierarchy at the top of the JPanel javadocs). JFrame.getContentPane() just returns a Container to place the Components that you want to display in the JFrame. Internally, it's using a JPanel (by default - you can change this by calling setContentPane()) As for why it's returning a Container instead of a JPanel - it's because you should program to an interface, not an implementation - at that level, all that you need to care about is that you can add Components to something - and even though Container is a class rather than an interface - it provides the interface needed to do exactly that.

As for why both JFrame.add() and JFrame.getContentPane().add() both do the same thing - JFrame.add() is overridden to call JFrame.getContentPane().add(). This wasn't always the case - pre-JDK 1.5 you always had to specify JFrame.getContentPane().add() explicitly and JFrame.add() threw a RuntimeException if you called it, but due to many complaints, this was changed in JDK 1.5 to do what you'd expect.

@Nate, what do you mean by " Internally, it's using a JPanel". You mean that Container is using a JPanel? What do you mean by that? I though that JPanel is a subclass of Container. And what can I change by "setContentPane"? OK. You say that Container is a class (and I always considered Container as a class). But JPane is also a class. Why we cannot use just JPane or just Container? I was able to do the same things by using only JPane. I was also able to do the same using only Containers.

JFrame is internally using a JPanel object to back the getContentPane() method. This is why Zachary's answer works. The actual JPanel reference is buried in the JFrame.rootPane field. You would call setContentPane() on the JFrame - for example, you could change line 10 in your first example from frame.add(panel) to frame.setContentPane(panel). Container is a class. JPanel is a class (which is a subclass of Container). You're confusing the type of the reference with the type of the object the reference references. Think about Container container = new JPanel()

@Lucio Thanks! Changed the link to a question here on StackOverflow about the same thing.

java - What is the relation between ContentPane and JPanel? - Stack Ov...

java swing user-interface jframe jpanel
Rectangle 27 23

The EL, initially, has been designed to be used inside attributes of the JSTL tags, and any other custom tag you might want to use or write yourself.

A later version of the JSP spec has allowed using the EL directly inside the JSPs, but this doesn't mean the JSTL isn't useful anymore. The only thing you can do with EL directly in the JSP is to write some value to the response like for example

${user.id}

which would write the ID of the user bean. If you want tests, loops, HTML escaping, URLs, date an number formatting, etc., you still need to use the JSTL.

java - Exact difference and relation between JSTL and Expression Langu...

java jsp java-ee jstl el
Rectangle 27 17

As others have pointed out, JPA is an specification an Hibernate provides an implementation. You use JPA annotations/API and, by including Hibernate jars in your classpath, Hibernate will provide the actual logic.

Additionally, Hibernate offers an API that is unrelated to JPA. You can use that as well; the main difference is:

At any rate, what you should completely avoid is mixing JPA with the Hibernate API. As a beginner, I would advice you to stick to JPA.

To ensure that you are using JPA, only include classes/annotations from java.persistence. Do not include anything from org.hibernate (or, if you want just to use Hibernate, do just the opposite).

+1, although the last part is incorrect. Even if you use Hibernate with its proprietary API, you'll have to use JPA annotations. Hibernate doesn't reimplement the JPA annotations.

java - Relation between JPA and Hibernate annotation - Stack Overflow

java spring hibernate jpa spring-mvc
Rectangle 27 1328

The theory (for the language lawyers and the mathematically inclined):

equals() (javadoc) must define an equivalence relation (it must be reflexive, symmetric, and transitive). In addition, it must be consistent (if the objects are not modified, then it must keep returning the same value). Furthermore, o.equals(null) must always return false.

hashCode() (javadoc) must also be consistent (if the object is not modified in terms of equals(), it must keep returning the same value).

The relation between the two methods is:

a.equals(b)
a.hashCode()
b.hashCode()

If you override one, then you should override the other.

Use the same set of fields that you use to compute equals() to compute hashCode().

public class Person {
    private String name;
    private int age;
    // ...

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 31). // two randomly chosen prime numbers
            // if deriving: appendSuper(super.hashCode()).
            append(name).
            append(age).
            toHashCode();
    }

    @Override
    public boolean equals(Object obj) {
       if (!(obj instanceof Person))
            return false;
        if (obj == this)
            return true;

        Person rhs = (Person) obj;
        return new EqualsBuilder().
            // if deriving: appendSuper(super.equals(obj)).
            append(name, rhs.name).
            append(age, rhs.age).
            isEquals();
    }
}

When using a hash-based Collection or Map such as HashSet, LinkedHashSet, HashMap, Hashtable, or WeakHashMap, make sure that the hashCode() of the key objects that you put into the collection never changes while the object is in the collection. The bulletproof way to ensure this is to make your keys immutable, which has also other benefits.

Additional point about appendSuper(): you should use it in hashCode() and equals() if and only if you want to inherit the equality behavior of the superclass. For instance, if you derive straight from Object, there's no point because all Objects are distinct by default.

You can get Eclipse to generate the two methods for you: Source > Generate hashCode() and equals().

The first null check is not necessary given the fact that instanceof returns false if its first operand is null (Effective Java again).

override - What issues should be considered when overriding equals and...

java override equals hashcode
Rectangle 27 19

You have to manage the Java relationships yourself. For this kind of thing you need something like:

@Entity
public class Contact {
  @Id
  private Long id;

  @OneToMany(cascade = CascadeType.PERSIST, mappedBy = "contact")
  private List<Phone> phoneNumbers;

  public void addPhone(PhoneNumber phone) {
     if (phone != null) {
        if (phoneNumbers == null) {
            phoneNumbers = new ArrayList<Phone>();          
        }
        phoneNumbers.add(phone);
        phone.setContact(this);
     }
  }

  ...
}

@Entity
public class PhoneNumber {
  @Id
  private Long id;

  @ManyToOne
  private Contact contact;

  ...
}

Thanks, setting the java relationships solved it.

Is the addPhone method correct? It looks to me like the null check is in the wrong place.

phone.setContact(this) - it colud be a memory leak? or not?

Why do I have to manage the java relationship myself? What if I have a unidirectional relationship?

java - JPA not saving foreign key to @OneToMany relation - Stack Overf...

java spring jpa