Your script defines the mapping as a MANY_TO_MANY, and by default, cascading is set to ALL. Bar.java says:
@ManyToMany(cascade = CascadeType.ALL)
private Set<Foo> foos = new HashSet<Foo>();
...
Type: Posts; User: wallenborn; Keyword(s):
Your script defines the mapping as a MANY_TO_MANY, and by default, cascading is set to ALL. Bar.java says:
@ManyToMany(cascade = CascadeType.ALL)
private Set<Foo> foos = new HashSet<Foo>();
...
In JPA (which is used by roo) this looks like
@PersistenceContext
private EntityManager entityManager;
@Transactional
public void storeList(List<MyEntity> entities) {
int imported = 0;
...
Is the column definition in the database table a DATE or a TIMESTAMP? For DATE, the annotation should be TemporalType.DATE, as in
@Temporal(TemporalType.DATE)
@Column(name = "VALID_FROM")
...
Hm, never had that, but i'm using LUW, maybe that doesn't have that problem. The sequence name is set in DB2Dialect, too, so you could add this
public String getQuerySequencesString() {...
Yes, java.sql.Types.
Yes, i had the same problem. NUMERIC and DECIMAL are supposed to be synonyms, but Hibernate insists on calling it NUMERIC, and DB2 is stubbornly storing DECIMALs. To solve the problem, use a...
While the roo shell is running it scans Person.java, so as soon as you implement a public void persist() in Person.java and save the file, the shell removes the autogenerated aspect from the *.aj...
Which version of db2jcc4.jar do you use?
The ImportPackage element in the pom is meant to resolve just that type of issue. You might try to add com.ibm.zos.batch.*;resolution:=optional to the list.
I think this is your problem:
As far as i know, the only legal way to get IBM's DB2 jdbc driver is from IBM itself. You can download the Express-C version of the database for free (google...
Sounds normal to me. SINGLE_TABLE is supposed to generate one table containing data from all child classes, see for example here.
Sure, here you are:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
The pom.xml apparently needs only very little tweaking. A solution for a very similar problem with Oracle JDBC drivers is described here, and Alan's suggestion in that thread can be translated to db2...
@PersistenceUnit(unitName="CRApplicationPU")
public void setEntityManager(EntityManager entityManager) {}
Shouldn't this be
@PersistenceContext(unitName="CRApplicationPU")
public void...
Ah, i should have seen the earlier questions. Downloaded STS-2.3.3.M1 and set up a dummy project. Seems to work just fine. Thanks!
I have a SpringsourceToolSuite-2.3.2 installation that came bundled with Roo 1.0.2.RELEASE. Now i'd like to upgrade that to use Roo 1.1.0.M1. If i try to add the 1.1.0.M1 directory to the list of Roo...
I encountered the same exception, see here.
Which Java version are you using?
Done. ROO-880.
Roo 1.1.0.M1 needs Java 6.
I had run the tests with Java 5, that's what caused the problems.
Now everything works.
Hi,
after switching from Roo 1.0.2 to 1.1.0.M1 Hibernate starts throwing exceptions. For example in the following script
project --topLevelPackage com.example
persistence setup --provider...