0
голосов
1ответов
3493 просмотров

Hibernate Inheritance Mapping and Attribute Override

The system I'm working on has a domain object named Order which inherits from AbstractPersistentObject. Now I need to add another domain object named ExternalOrder which has some of the properties of Order but not all. I would like these two objects to be treated polimorphically in certain places...

0
голосов
1ответов
4418 просмотров

BlackBerry Persistent store

I am developing an application in which I want to store many data entries using persistent store. the problem is whenever new entry is made it replaces the existing entry. here is my code please help me. import net.rim.device.api.ui.*; import net.rim.device.api.ui.component.*; import net.rim.dev...

3
голосов
3ответов
1353 просмотров

Pure Python persistent key and value based container (a hash like interface) with large file system support?

I am looking for a (possibly) pure Python library for persistent hash table (btree or b+tree which would provide following features Large file support (possibly in terabytes) Fast enough and low memory footprint (looking for a descent balance between speed and memory) Low cost of management Rel...

7
голосов
6ответов
4042 просмотров

Persisting graph data (Java)

I have an application which utilizes graph (tree-like) custom structures. The structures are not real trees, but pretty much everything is connected together. The quantity of the data is also big (millions of nodes can exist). Tree-nodes can vary in type to make it more interesting (inheritance)....

1
голосов
2ответов
276 просмотров

ORMs that work with complex .Net generic objects (e.g. nested List<...>, etc)?</...>

I am just starting to model the data for a new project, which must be persistable. Looks like the most natural OO model will have lots of nested .Net generics. Lists of objects, and these objects will also contain Lists of other generic types, and so on, nested at least three levels deep. Id...

2
голосов
2ответов
134 просмотров

Need help with some Hibernate relational mappings

These are the tables I want to map using Hibernate: user (PK UserId) article (PK ArticleId, FK CreatorUserId) category (PK CategoryId, FK ParentCategoryId) I have been looking at the documentation for Hibernate, but I really cannot choose what type of mapping is the most suitable for my tables...

7
голосов
3ответов
2522 просмотров

Data Access Layer or having object with CRUD methods?

I used to have a Data Access Layer that take the object by parameter and handle with abstraction the type of persistence required. At my new job, the architect is thinking to implement CRUD operation (load..save..delete..update) into all model object. Those method would have an object by paramete...

0
голосов
3ответов
1907 просмотров

When setting a session with PHP, how do you make it global to the entire site?

I am creating a session and I want a variable to be available for the entire site, so for example: Joe Soap lands on a page called red-widgets.php, - Joe's session variable is let's say 'red-widgets'. Joe then clicks on another page called blue-widgets.php. I would like the session variable to b...

1
голосов
3ответов
10086 просмотров

How can I use the sql case clause in HQL?

I really need help regarding this one. Here is the code snippet: hSql=" select case when min(start_day_plan) is not NULL then min(start_day_plan) else to_date((min(insertDate)) - cast('1 month' as interval),'yyyy-MM-dd' ) end from Project" getHibernateTemplate(...

1
голосов
1ответов
369 просмотров

Persistence Pattern - Rule based Observer

I'm trying to add functionality to an app where a user can subscribe for changes made either: To another entity (by any user) By another user (to any other entity) A combination of the two (this last one's optional, but makes the problem more challenging) I'm wondering how best to persist the...

6
голосов
4ответов
12001 просмотров

Load balancing: DNS round robin in front of hardware load balancers. How to share stickiness?

DNS Round Robin (DRR) permits to do cheap load balancing (distribution is a better term). It has the pro of permitting infinite horizontal scaling. The con is that if one of the web servers goes down, some clients continue to use the broken IP for minutes (min TTL 300s) or more, even if the DNS i...

7
голосов
6ответов
435 просмотров

Persisting complex test data

We are using builder pattern to generate test data. These domain objects have relations between them. Our functional tests require these objects to be persisted. Think about this model: If I want a plain instance of C I do aNew().c().build() If I want it to be persisted I do aNew().c().save...

2
голосов
3ответов
253 просмотров

.NET persistence framework that supports test data

We are currently using SubSonic as our persistence layer because it's light but also because it allows us to feed in test data so our DAL can be tested without hitting the database. I absolutely love that about SubSonic. However, because we are also running into other issues with SubSonic, I'm ...

1
голосов
4ответов
2871 просмотров

Changing target table for Hibernate mapping

Is it possible to change the target table for a Hibernate mapping? My use case is that while I get the data from one table, in cases where the data cannot be processed it is stored in a error table for later analysis. Although it is possible to define entity-names in hibernate mappings, in my o...

3
голосов
6ответов
139 просмотров

Some kind of Data persistency

Basically what I need to know is this: I have to show a drop down list of countries to my users each country also has a code associated to it. I will have to work with both the country and the code What would be the best approach: -We (the dev.) are thinking about a table in our app database w...

8
голосов
6ответов
4480 просмотров

WinForms - which is easiest approach for persisting some data?

Just building my first WinForms application. Question - What's the easiest/best approach for saving some data between use of the application (e.g. list of URL with status &amp; date/time in this case)? I don't see any need for a database. For example * Is just storing to text file easies...

3
голосов
3ответов
721 просмотров

Can I save user input to a plist that lives in the resources folder on iOS?

I have a plist in my Resources folder that I'm using to store conversion information. I'd like to give the user the ability to "turn off" certain units so that those units will never be used in conversions. I don't want to have to maintain two lists with the conversion information in it. I ...

2
голосов
1ответов
419 просмотров

Best way to persist state with Tomcat/Scala?

What's the best way to persist user state with Tomcat/Scala? My first thought is to keep account information on the session at all times and redirect the user to a login page if there's no information on the session for the account. Is this a viable model, or is there a smarter way of persisting ...

1
голосов
1ответов
677 просмотров

Is this a ManyToMany JPA/Hibernate relationship or there is another way to map this?

I'm getting started with JPA and created the following (simplified) tables; airport -------- id (pk) city code ... trip -------- id (pk) originAirport_id (fk) destinationAirport_id (fk) ... I'm trying to map this in JPA/Hibernate. In My trip object I created 2 airport objects: private Ai...

3
голосов
1ответов
1338 просмотров

Detecting Changes in Entities within an Aggregate Root

I am looking to see what approaches people might have taken to detect changes in entities that are a part of their aggregates. I have something that works, but I am not crazy about it. Basically, my repository is responsible for determining if the state of an aggregate root has changed. Let's ...

1
голосов
1ответов
1253 просмотров

Alternatives of persisting data using C#?

I have a small application in C#, and so far I have implemented it using data persistence classes that are running SQL directly, I understand there are better alternatives as Hibernate.NET and possibly Spring.NET. There are some other I forget? pros and cons? thanks!

16
голосов
5ответов
11978 просмотров

How to open a core data database?

Is there any way in which I can view my core data database without having to load it programatically through the code?!

4
голосов
3ответов
3142 просмотров

Class for pickle- and copy-persistent object?

I'm trying to write a class for a read-only object which will not be really copied with the copy module, and when it will be pickled to be transferred between processes each process will maintain no more than one copy of it, no matter how many times it will be passed around as a "new" object. Is ...

1
голосов
1ответов
2725 просмотров

How can I test wether persistence.xml has been found or not?

I have to test some things on a project which has been developed by others, but is new to me. They are using Hibernate as a JPA implementation. I got a virtual machine in which everything is set up, but when I want to start any Testclient (small console programs, no Unittesting). I always get th...

2
голосов
3ответов
184 просмотров

Should persistent objects validate data upon set?

If one has a object which can persist itself across executions (whether to a DB using ORM, using something like Python's shelve module, etc), should validation of that object's attributes be placed within the class representing it, or outside? Or, rather; should the persistent object be dumb an...

1
голосов
1ответов
98 просмотров

Cocoa Data Manipulation

I'd like to know if cocoa has a default way of storing data. If yes what is it? I mean like rails is by default using sqlite... Also I'm searching for a tutorial on how to use it... Like get data and showing it into a listview, etc... Thanks for your help!

0
голосов
1ответов
4951 просмотров

Persistence.xml

When i follow restful project in netbeans then i get the error. SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle.toplink.essentials.PersistenceProvider Caused by: java.lang.ClassN...

3
голосов
3ответов
5774 просмотров

How can I access Java heap objects without a reference?

I would like to get a reference to all objects in the Java heap, even if I don't immediately have a reference to those objects in my active thread. I don't need non-referenced objects (those "queued" for garbage collection), but would like to get anything that's still in use. The goal is to ser...

119
голосов
4ответов
73532 просмотров

Java Persistence / JPA: @Column vs @Basic

What is the difference between @Column and @Basic annotations in JPA? Can they be used together? Should they be used together? Or does one of them suffice?

32
голосов
10ответов
16739 просмотров

Why put a DAO layer over a persistence layer (like JDO or Hibernate)

Data Access Objects (DAOs) are a common design pattern, and recommended by Sun. But the earliest examples of Java DAOs interacted directly with relational databases -- they were, in essence, doing object-relational mapping (ORM). Nowadays, I see DAOs on top of mature ORM frameworks like JDO and H...