many-to-many

mashup of google map,flicker,and weather.com

how to create a mashup of google map,weather.com and google search engine where a user can enter any location on the textbox and the map will create a bubble with the weather info and news on that entered location? ...

cannot geocode in other browser

Hi I created a mashup where a user can enter a location.When using IE7 almost all the location can be geocoded but not with other browsers......what do you think is the issue here or is there a fix for this?I use javascript geocoding like: function addToMap(response) { var x="Fa, France"; // Retrieve the object i...

Calling a function inside an iframe from outside the iframe

I have a page with an iframe. Inside that iframe I have a javascript function like this: function putme() {} How can I call this function on the main page? ...

google map problem

I got a google map and I load it but I want to change the direction or center by changing the center,how can I do this? I got a code like this to load the map: function putmap(x) { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("Map")); // Create new geocoding object ...

Many to many tables and querying on the same variable with arrays

SOLVED - see Bish below I've got a list of checkboxes that all dump to $fruitid[], and a many-to-many table1: BoxID FruitID 01 01 01 02 02 01 02 03 02 04 03 02 etc. etc. I want a user to check the box next to each fruit they want, and then query to pull up a list of each box that contains all...

How do I get all rows from ITEM table, which are children of a parent ITEM table row, where relationship is stored separately?

Hi, How do I get all rows from ITEM table, which are children of a parent ITEM table row, where relationship is stored separately? How can I do a join to do this? "get all rows from ITEM table, which are children of this specific ITEM table row, all child items from this parent item, where relationship is stored in separate RELATIONSH...

NHibernate ManyToMany relationship - using AuditInterceptor - object references an unsaved transient instance - save the transient instance before flushing

The domain model the DomainObject's audit fields are populated using an AuditInterceptor. DomainObject Id EstablishDate EstablishId UpdateDate UpdateId Message : DomainObject Description MessageDistributions Distribution : DomainObject BeginEffective EndEffective MessageDistributions MessageDistribution...

Ordered many-to-many relationship in NHibernate

Let's say I have two classes: Item and ItemCollection, where ItemCollection contains an ordered list of Item objects with an index, i.e. the list is ordered in a way specified by the user. Let's also say that they have a many-to-many relationship, an ItemCollection can contain many items and an Item can belong to several ItemCollections...

OLAP: Many-to-many relationship between products and parent-child hierarchy of categories

Hello. I need a help with creating OLAP cube which allows to analyse many-to-many relationship between products and parent-child hierarchy of categories. I have next relational structure: table "Products": "ProductID", "Name" table "Categories": "CategoryID", "Name", "ParentID" (where "ParentID" has FK reference to "CategoryID") table...

How to do a select field in Rails for a many-to-many relationship (and intermediary table)?

Trying to do a select field for an admin interface. What I have is not a traditional many-to-many relationship, but I imagine the principles are the same. I have an "Event" model and an "EventRelation" model...every Event can have many sub-events, and one primary event...so EventRelation has primary_event_id and sub_event_id fields. Ho...

What is the correct way to define many-to-many relationships in NHibernate to allow deletes but avoiding duplicate records

Hi, I've been fighting with an NHibernate set-up for a few days now and just can't figure out the correct way to set out my mapping so it works like I'd expect it to. There's a bit of code to go through before I get to the problems, so apologies in advance for the extra reading. The setup is pretty simple at the moment, with just thes...

How can an indexed many-to-many set be mapped in NHibernate?

Consider an entity, Entry, that contains a collection of another entity (many-to-many), Category, such that the Entry can be associated with a given Category no more than once (implying a "set" and constrained by the database) and the ordering of the Category entities within the collection is fixed and is defined by an extra field on the...

Many to many relationship with ADO.NET Entity Data Model

I've created many-to-many relationship with ADO.NET with extra order fields in the middle table. So I have... Customers -customer_id -customer_name Orders -order_id Customers_to_Orders -customer_id -order_id -seq And now I don't really know how to add new orders to customers with specyfing order, any suggestions? ...

Fluent-NHibernate: How to a create a many-to-many relationship with a unique contraint

Hi. I want to create a many to many relationship, but I want to have in the new table(MessageReceivers) a unique contraint on both columns (AdvanceMessageId,UserId): mapping.HasManyToMany(x => x.Receivers) .WithParentKeyColumn("AdvanceMessageId") .WithChildKeyColumn("UserId") .Cascade.All(...

Server Or Database

Hi guys I need your opinion.I am in a situation where I need to use ajax so I need to query users info every 30 seconds.....which is more efficient query the server first(say check a text file first) and if there is an update for a user info, do a full blown database query or just directly query the database directly every 30 seconds.Ple...

LINQ to SQL testing

Hi I'm using Linq to sql to access an SQL Server. I try to write all my database queries in a partial class so they can be accessed directly from the DataContext. Now I would like to test the Data Context but I can't figure out the best way och doing that. Bascially I need to test 3 things: 1. The queries return the correct data (no...

Django: Exclude on a many-to-many relationship through a third table

I have a problem making "exclude" querys on tables which have a many-to-many relationship through a third table. I have a table with projects, a table with people and a relationsship table with the flags "is_green, is_yellow, is_red", like: class Project(models.Model): ... class Person(models.Model): projects = models.ManyToMan...

Visual Studio 2008 Class Designer - many to many associations

Hi! Is there a trick for visualizing a many to many assocation in the Visual Studio Class Designer? I have an Employee entity and a Team entity. So each entity has a list of his counterpart. Associations are possible to show in the Class Designer, but only for 0..1 mulitplicity. Or does anyone has experience with VS 2010 and the new a...

select_related() and many to many fields with ajax (Django)

I have a simple view that I want to respond to both ajax and regular HTTP requests. Simplified, it looks like this: def tag_search(request, tag): items = Item.objects.filter(tags__tagname__exact=tag) if request.is_ajax(): return HttpResponse(serializers.serialize('json', items), mimetype='application/json') else:...

In nHibernate, can I map an abstract base class to a collection?

I have a base class for content items in a CMS I'm building. It's currently marked abstract because I only want derived classes to be instantiated. Derived classes like BlogPost, Article, Photo, etc. are set up as a joined subclass to my ContentBase class in nHibernate. I'm trying to set up a many-to-many mapping between this class an...