Maybe I got it wrong but i though that JPA was able to update an existing table (model changed adding a column) but is not working in my case.
I can see in the logs eclipselink attempting to create it but failing because it already exists. Instead of trying an update to add the column it keeps going.
<property name="javax.persistence.j...
I work with a ASP.NET UI framework that pulls fields for a particular screen off a database. These fields can be associated with particular data fields in another database for binding. The idea with this setup is that if a client needs a new column on a table, they can easily add it, and create a UI field that binds to it without any sor...
I am in charge of a rebuilding a website that gets about 250,000 visitors a day. We'd like to use Scala, but it does not work very well with Spring (in some minor cases) and Hibernate (there is a major and very annoying mismatch here if you want to use scala collections, which we do).
The application itself is going to have about 40-50 ...
Should I invest a lot of time trying to figure out an ORM style implementation, or is it still common to just stick with standard SQL queries in python/pylons/sqlalchemy?
...
I have a class hierarchy of JPA entities that all inherit from a BaseEntity class:
@MappedSuperclass
@EntityListeners( { ValidatorListener.class })
public abstract class BaseEntity implements Serializable {
// other stuff
}
I want all entities that implement a given interface to be validated automatically on persist and/or update....
Hi there, this is a quick question:
I have JPA entities where some properties are annotated with @Transient.
Shall I use these properties in equals/hashCode/toString methods?
My first thought is NO but.... I don't know why.
Tips?
Ideas?
Explanations?
Thanks in advance
...
Hi!
I'm (still) having loads of issues with HSQLdb & OpenJPA.
Exception in thread "main" <openjpa-1.2.0-r422266:683325 fatal store error> org.apache.openjpa.persistence.RollbackException: user lacks privilege or object not found: OPENJPA_SEQUENCE_TABLE {SELECT SEQUENCE_VALUE FROM PUBLIC.OPENJPA_SEQUENCE_TABLE WHERE ID = ?} [code=-5501,...
We Want to persist a many to many table with EclipseLink, we have just tried by setting the collections and persist but it returns error cause it seems that is requesting for all of the collections in the hierarchy, we are doing this cause the system did not mapped that table cause it has all of its fields as foreign keys so instead of ...
Let's say I have a data mapper function that aggregates multiple tables and generates an object instance from that data. The mapper has a typical save() method which delegates to update/insert.
When the mapper executes save - ideally it isolates object fields that have been modified, thus preventing the code from blanket bombing the da...
There is a model relation like this.
class A
belongs_to :ref_config,:class_name => 'User'
end
My question is :
the A has a attribute named flag, now i want to create a function like this:
if flag == 1, I want the class A like this belongs_to :ref_config,:class_name => 'Department and if flag == 2, i want the class A like this ...
I just started using MySQL and I just can see myself woking with strings!
I mean the compiler can't catch errors like this and it's just a mess!
Is there a wrapper or some kind of class I can add that does something as simple as making a function that adds a table and asks for args?
I'm sure there is a tool like that but I can't find it...
Hi all,
I have recently started to use Kohana and I know inheritance is in infancy stages at the moment. The work around is using a $_has_one annotation on the child class model. In may case i have "page" as the parent of "article". I have something like,
protected $_has_one = array('mypage'=>array('model'=>'page', 'foreign_key'=>'id'))...
I am making a POS like system. I wonder how to map subclass using JPA (this is for my DAO). Product class has product details and OrderProduct class has information about the Product and details about the order.
@Entity
@Table(name="products")
public class Product implements Serializable{
@Id
@Column(name="id")
@GeneratedVal...
We would like to map a single table on two classes with NHibernate. The mapping has to be dynamically depending on the value of a column.
Here's a simple example to make it a bit clearer:
We have a table called Person with the columns id, Name and Sex.
The data from this table should be mapped either on the class Male or on the cla...
Possible Duplicates:
Are there good reasons not to use an ORM?
Why should you use an ORM?
Hello,
i develop since many years in SQL (many different sql servers like Oracle, MSSql, Mysql) and i always been happy in doing that. I've recently seen a lot of stuff around ORMs and i'm asking why should i move toward this world.
Can...
I am playing around with Castle ActiveRecord and noticed that the download included the file, Castle.ActiveRecord.Linq.dll. I haven't found any documentation for using Linq with ActiveRecord, only some old blog posts.
What is the usage pattern? Is Castle.ActiveRecord.Linq ready for production use?
...
I am used to Django South http://south.aeracode.org/, which allows schema and data migrations for Django projects. Does there exist a similar tool for Hibernate projects ?
...
I'm looking for a very simple ORM framework working on Android for sqlite. I've been testing activeAndroid but none of the example could ever build on Eclipse. By the way, how do guys implements a "many to many" relationship in sqlite for android ? How do you reflect the cascade regarding deletion of rows and guarantee the database integ...
Hello. What is the ORM that can bound to a Java application in the least possible time, given its performance is not important?
...
I have need to provide a way for users to edit tables in ASP.Net. The tables are simple (no master/detail relationships), but there are likely to be a lot of them. What's the quickest/simplest way to provide a view/edit interface to a table, even considering commercial options (but not Iron Speed Designer. That thing is ridiculously e...