I want to use NHibernate.Spatial. I also want to use new NHibernate 3.0 features such as the improved LINQ provider and the QueryOver functionality, which are only available in NHibernate's source control trunk.
Are these two things compatible? I can't work without Spatial but I really want the LINQ features, which will have to go if th...
I am trying to setup a many-to-many mapping in Fluent Nhibernate that has a where clause attached to the child table.
This is basically how it should work:
HasManyToMany(p => p.Images)
.Table("ProductImages")
.ParentKeyColumn("ProductID")
.ChildKeyColumn("ImageID")
.Where("ImageTypeID = 2");
The ImageTypeID column is in the I...
In the auth module, we have users and roles with a many to many relationship.
My question probably has a simple answer, but I couldn't find it by myself... How would I go about selecting only users having a certain role using ORM?
What I'd like to do is something like this:
ORM::factory('user')->with('roles')->where('role','member')->f...
In my grails application, some of my domain classes will never be changed by Users.
However, some maintenance work is sometimes necessary, and administrator should be able to create/edit few instances from time to time (let's say twice a year).
I would like to set a read-only 2nd level cache strategy for these domain classes (static ma...
I have this problem.
I have a module (module 1) that use Nhibernate to manage entity persistence; this module interacs with an other module (module 2).
The "module 2" allows to generate dynamically native SQL where clause. Now I would use it to manage filter operation in "module 1".
Which is the bast way to do it?
Is possible get the...
Why is Django executing statements such as this:
SELECT (1) AS [a] FROM [my_table]
WHERE ([my_table].[id] = ?
AND NOT ([my_table].[id] = ? )) (1, 1)
This happens when calling is_valid() on a formset created the following way:
MyFormSet = modelformset_factory(Table, fields=['my_field'], extra=0)
my_form_set = MyFormSet(request.POST...
Is there an easy way using a library to facilitate the synchronization of two hibernate instances. One running locally on a client and one running on a central server exposed via a web service.
So Client tracks changes it makes, pushes them to the Server. The server ensures that the clients is not updating out of sync objects and stores...
I need to export big amount of data from database. Here is classes that represents my data:
public class Product{
...
@OneToMany
@JoinColumn(name = "product_id")
@Cascade({SAVE_UPDATE, DELETE_ORPHAN})
List<ProductHtmlSource> htmlSources = new ArrayList<ProductHtmlSource>();
...
}
ProductHtmlSource - contains big s...
WHERE column = value ->add(column, value);
WHERE column <> value ->add(column, value, Criteria::NOT_EQUAL);
Other Comparison Operators
> , < Criteria::GREATER_THAN, Criteria::LESS_THAN
>=, <= Criteria::GREATER_EQUAL, Criteria::LESS_EQUAL
IS NULL, IS NOT NULL Criteria::ISNULL, Criteria::ISNOTNULL
LIKE, ILIKE Criteria::LIK...
In my legacy database, I've got a table [Templates] with four columns for the "special instructions" on a shipment:
.....|Spx_1|Spx_2|Spx_3|Spx_4|....
.....| | | | |.....
I want to map this to a List in my class:
public class Template
{
..
public virtual List<string> SpecialInstructions
{
get;
...
I need to store localized entities in a database (for instance a Product, which has a Name, which is different in English and Danish). There are several well-known ways to do this, for instance having some sort of a resource table containing the values of the localized columns.
However, this does not seem to be very easy to fit into an ...
Disclaimer: Bit of a C# newbie - first Software Dev gig in awhile after being in QA for a couple years.
I realize flavors of this question have been asked before (inheritance in LINQtoSQL and the like), but I'm hoping I ask the question differently.
In my database, I will have a super-type of "Event" and multiple sub-types: Conferenc...
I'm trying to map 2 tables together in Fluent Nhibernate, but the only way to join them is based on using the LEFT function on one of the columns. So a SQL join would look like this:
select * from TableA INNER JOIN TableB ON LEFT(TableA.ColA, 12) = TableB.ColB
Is there any way to map this in NHibernate?
...
i am working on galileo but i am not able to find the plugin for hibernate 3.3 can anybody send me the plugin link please. it's urgent. and also send me the spring 2.x latest version plugin also.
Thanks in advance,
Bhuvan Yadav.
...
Hi,
Excuse me for my poor english in advance as it is not my mother tongue.
Like in this example:
http://www.xylax.net/hibernate/manytomany.html
But i have in the table foo-bar 2 attributes which are not part of the primary or foreign keys.: one boolean(A) & one string(B).
I know how to map it without attributes but not in this case.
...
I'm trying to learn how to use Hibernate to implement Java Object Persistence. Specifically, I'm trying to figure out how to implement a unidirectional one to many mapping. I've read the hibernate documentation and the numerous Stackoverflow questions on the subject and they are not entirely clear, so I'd like to know what the correct ...
So in a recent project (a small internal tool), I want to experiment with not using an ORM tool which we typically use in all our projects. The reason is that I particularly aren't a fan of them specially in complex projects with complex object hierarchies and relationships. Using an ORM it becomes difficult to debug performance issues a...
Hello fellow PHPers!
It does not seem like Doctrine 2 has built-in validation. Is this a feature that will be supported in the future? How and where do you validate your Doctrine 2 entities?
Guess I have to write my own validation engine for Doctrine.
thanks
...
Let's say I have a domain class called ShopCategoryPageTab. And I have a domain class called Product.
I want ShopCategoryPageTab to have a list of Products. However, this list is not static, but determined by a formula.
For example, I might want to have a "products" property which would list all products with criteria X, Y Z.
So this...
We've had quite a bit of discussion among our development group concerning whether the composition of entities should drive the database design, or should the database design drive the composition of the entities.
For those who have dealt with this, what has been your philosophy? Of course, not every entity maps 1:1 to a database table....