Search Results

Search found 8187 results on 328 pages for 'mind mapping'.

Page 5/328 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • extbase mapping to an existing table doesn't work

    - by hering
    I've extended the pages table and now I want to use some of the data in a domain object called "Tags". So I tried the following in the /Configuration/TypoScript/setup.txt: plugin.myextension.persistence.classes.Tx_myextension_Domain_Model_Tag { mapping { tableName = pages recordType = Tx_myextension_Domain_Model_Tag columns { tx_myextension_tag_name.mapOnProperty = name uid.mapOnProperty = id } } } But It seems that the extension tries to access the table Tx_myextension_Domain_Model_Tag (which doesn't exist) This is the error I receive: Tx_Extbase_Persistence_Storage_Exception_SqlError` Table 'tx_myextension_domain_model_tag' doesn't exist: SELECT tx_myextension_domain_model_tag.* FROM tx_myextension_domain_model_tag WHERE tx_myextension_domain_model_tag.id = '24' LIMIT 1 What have I done wrong?

    Read the article

  • NHibernate Mapping problem

    - by Bernard Larouche
    My database is being driven by my NHibernate mapping files. I have a Category class that looks like the following : public class Category { public Category() : this("") { } public Category(string name) { Name = name; SubCategories = new List<Category>(); Products = new HashSet<Product>(); } public virtual int ID { get; set; } public virtual string Name { get; set; } public virtual string Description { get; set; } public virtual Category Parent { get; set; } public virtual bool IsDefault { get; set; } public virtual ICollection<Category> SubCategories { get; set; } public virtual ICollection<Product> Products { get; set; } and here is my Mapping file : <property name="Name" column="Name" type="string" not-null="true"/> <property name="IsDefault" column="IsDefault" type="boolean" not-null="true" /> <property name="Description" column="Description" type="string" not-null="true" /> <many-to-one name="Parent" column="ParentID"></many-to-one> <bag name="SubCategories" inverse="true"> <key column="ParentID"></key> <one-to-many class="Category"/> </bag> <set name="Products" table="Categories_Products"> <key column="CategoryId"></key> <many-to-many column="ProductId" class="Product"></many-to-many> </set> when I try to create the database I get the following error : failed: The INSERT statement conflicted with the FOREIGN KEY SAME TABLE constraint "FK9AD976763BF05E2A". The conflict occurred in database "CoderForTraders", table "dbo.Categories", column 'CategoryId'. The statement has been terminated. I looked on the net for some answers but found none. Thanks for your help

    Read the article

  • FluentNhibernate many-to-many mapping - resolving record is not inserted

    - by Dmitriy Nagirnyak
    Hi, I have a many-to-many mapping defined (only relevant fields included): // MODEL: public class User : IPersistentObject { public User() { Permissions = new HashedSet<Permission>(); } public virtual int Id { get; protected set; } public virtual ISet<Permission> Permissions { get; set; } } public class Permission : IPersistentObject { public Permission() { } public virtual int Id { get; set; } } // MAPPING: public class UserMap : ClassMap<User> { public UserMap() { Id(x => x.Id); HasManyToMany(x => x.Permissions).Cascade.All().AsSet(); } } public class PermissionMap : ClassMap<Permission> { public PermissionMap() { Id(x => x.Id).GeneratedBy.Assigned(); Map(x => x.Description); } } The following test fails as there is no record inserted into User_Permission table: [Test] public void AddingANewUserPrivilegeShouldSaveIt() { var p1 = new Permission { Id = 123, Description = "p1" }; Session.Save(p1); var u = new User { Email = "[email protected]" }; u.Permissions.Add(p1); Session.Save(u); var userId = u.Id; Session.Evict(u); Session.Get<User>(userId).Permissions.Should().Not.Be.Empty(); } The SQL executed is (SQLite): INSERT INTO "Permission" (Description, Id) VALUES (@p0, @p1);@p0 = 'p1', @p1 = 1 INSERT INTO "User" (Email) VALUES (@p0); select last_insert_rowid();@p0 = '[email protected]' SELECT user0_.Id as Id2_0_, user0_.Email as Email2_0_ FROM "User" user0_ WHERE user0_.Id=@p0;@p0 = 1 SELECT permission0_.UserId as UserId1_, permission0_.PermissionId as Permissi2_1_, permission1_.Id as Id4_0_, permission1_.Description as Descript2_4_0_ FROM User_Permissions permission0_ left outer join "Permission" permission1_ on permission0_.PermissionId=permission1_.Id WHERE permission0_.UserId=@p0;@p0 = 1 We can clearly see that there is no record inserted into the User_Permissions table where it should be. Not sure what I am doing wrong and need an advice. So can you please help me to pass this test. Thanks, Dmitriy.

    Read the article

  • MVC + Extjs + IIS6 + Wildcard Mapping = Post Form resulting in 302 object moved

    - by Orkun Balkanci
    Everything seems to work fine until i want to submit the form and update the database. Wildcard mapping works on requests like "/navigation/edit/1", but when i submit the form as: var ajaxPost = function(Url, Params) { Ext.Ajax.request({ url: Url, params: Params, method: 'POST', async: false, scope: this }); }; it says "200 bad response: syntax error" and in firebug there is "Failed to load source for: http://.../Navigation/edit/1". Any help?

    Read the article

  • WPF / Silverlight - Mapping API

    - by Travis
    I am about to start on a project where I need to display maps with cross streets and possibly directions. I know there are a lot of API for the web, but I was wondering what the best solution is for a desktop application. I know of Bing Maps and I believe there are some Google Maps solutions out there as well. Any help or information on good mapping API's would be greatly appreciated. Thanks.

    Read the article

  • Commercial Mapping software - South Africa

    - by Ian
    Hi, I am looking for a good quality and reliable mapping solution for South Africa. We require similar functionality to Bing and Google. ie plotting markers on the map, geocoding, drawing polygons, popups on the map showing content etc. So far Google maps looks like the winner, but are there other options that you would recommend. thanks

    Read the article

  • NHibernate Mapping + Iset

    - by jack
    Hi all I have a mapping file <set name="Friends" table="Friends"> <key column="UserId"/> <many-to-many class="User" column="FriendId"/> </set> I would like to specify extra columns for the friend table this creates. For example Approve (the user must approve the friend request) Is there a easy way?

    Read the article

  • efficient list mapping in python

    - by Joey
    Hi everyone, I have the following input: input = [(dog, dog, cat, mouse), (cat, ruby, python, mouse)] and trying to have the following output: outputlist = [[0, 0, 1, 2], [1, 3, 4, 2]] outputmapping = {0:dog, 1:cat, 2:mouse, 3:ruby, 4:python, 5:mouse} Any tips on how to handle given with scalability in mind (var input can get really large).

    Read the article

  • GPL vs plugin interfaces not designed with a specific application in mind

    - by Kristóf Marussy
    I am not seeking or in need of legal advice, but an interesting though experiment came to my mind. Imagine the following situtation (I cannot really think about a concrete example and I am unsure if a real manifestation even exists): there is a free (libre) api A licensed under some permissive license or even LGPL. Non-free application B implements this api in order host plugins, but there are other free software doing the same thing. Moreover, there is plugin C acting as a plugin under api A. It links to library D, that is under GPL, so C is also under GPL. Plugins using A are loaded into hosts via a dlopen-like mechanism and use complex data structure for host-plugin communication. Neither B nor C distribute any files that may be required for A to function properly (like headers containing the structure definitions of A or dynamic libraries containing helper functions for A written by the authors of A), but such things may exist. Now some user installs application B and plugin C on his machine, along with anything that may be required for api A to function properly. Then he proceeds and loads C into B and creates some intellectual property with B which is not a piece of software. Did a GPL violation happend at some point, and if so, who violated GPL and why? The authors of C violate D's license by making C possible to be used in non-free host B? This is a possibility because they can't give and exception of GPL (like one described in http://www.gnu.org/licenses/gpl-faq.html#GPLPluginsInNF or http://www.gnu.org/licenses/gpl-faq.html#LinkingOverControlledInterface) due to D's license terms. The authors of B violate C's and D's license by making C possible to be loaded in B? This is a possibility because http://www.gnu.org/licenses/gpl-faq.html#NFUseGPLPlugins disallows the mechanisms A uses for communitation between the free and non-free modules. The authors of A, because the api may be used (and in this case, was used) for communication between GPL'd and non-free software. This would be extremely absurd. The user, because at the moment of loading B into C, he made a derived work of C. I think this is impossible, because he does not distribute it. But would the situation change is he decided to release a configuration file of B which makes B load C as a plugin? Nobody, because A counts as a 'system library', and both B and C directly interact only with A, not eachother. In a sane world, this would happen... A concrete example of A could be some kind of audio (think LADSPA) or image processing api. However, I could find no such interface (that is free software, generic and is also implemented by commercial tools). A real-world example could also be quite enlightening.

    Read the article

  • Object mapping in objective-c (iphone) from JSON

    - by freshfunk
    For my iPhone app, I'm consuming a RESTful service and getting JSON. I've found libraries to deserialize this into an NSDictionary. However, I'm wondering if there are any libraries to deserialize the JSON/NSDictionary/Property List into my object (an arbitrary one on my side). The java equivalent would be the object-relational mappers although the sort of object mapping I'm looking for is relatively straightforward (simple data types, no complex relationships, etc.). I noticed that Objective-C does have introspection so it seems theoretically possible but I haven't found a library to do it. Or is there a simple way to load an object from an NSDictionary/Property List object that doesn't require modification every time the object changes? For example: { "id" : "user1", "name" : "mister foobar" "age" : 20 } gets loaded into object @interface User : NSObject { NSString *id; NSString *name; int *age; }

    Read the article

  • Nhibernate mapping

    - by john
    Hi All I am trying to map Users to each other. The senario is that users can have buddies, so it links to itself I was thinking of this public class User { public virtual Guid Id { get; set; } public virtual string FirstName { get; set; } public virtual string LastName { get; set; } public virtual string EmailAddress { get; set; } public virtual string Password { get; set; } public virtual DateTime? DateCreated { get; set; } **public virtual IList<User> Friends { get; set; }** public virtual bool Deleted { get; set; } } But am strugling to do the xml mapping.

    Read the article

  • NHibernate - Mapping tagging of entities

    - by ZNS
    Hi! I've been wrecking my mind on how to get my tagging of entities to work. I'll get right into some database structuring: tblTag TagId - int32 - PK Name tblTagEntity TagId - PK EntityId - PK EntityType - string - PK tblImage ImageId - int32 - PK tblBlog BlogId - int32 - PK class Image Id EntityType { get { return "MyNamespace.Entities.Image"; } IList Tags; class Blog Id EntityType { get { return "MyNamespace.Entities.Blog"; } IList Tags; The obvious problem I have here is that EntityType is an identifer but doesn't exist in the database. If anyone could help with the this mapping I'd be very grateful.

    Read the article

  • Mapping class properties to generic columns in table .NET

    - by Tony_Henrich
    I have have a SQL Server table which has generic names like Text1, Text2.. etc. The table was designed like this because the same structure is used for different projects. I have a class in .NET which has properties. Say a Customer class has a property called FirstName. How can I do the mapping from FirstName to Text1 just once (central place) in the application so that I don't have to remember and hard code the mappings all over the app when I create the different DAL methods? For example, I want the app to know when I want to update, insert a FirstName, the DAL automatically uses Text1. Basically I don't have to remember which property goes to which column. The idea is so the developers do not map the properlies/columns in a wrong way. It's always consistent. Note: Database inserts, updates and deletes are allowed through stored procedures only.

    Read the article

  • Using property file in hibernate mapping

    - by Zoltan Hamori
    Hi, I have a two nodes environment using the same database. In the database there is a resource table like RESOURCE_ID, CODE, NODE The content of the NODE column can be 1 or 2 depending on which node can use it. As I need to deploy the same ear to the two nodes, I would like to map this table like this: <hibernate-mapping> <class name="ResourceVO" table="RESOURCE" dynamic-update="true" optimistic-lock="dirty" where="NODE=${node.value}" > I would like to store the node.value property on the file system, so the instances could identify which resource to use. Is it possible in hibernate?

    Read the article

  • Fill object data from several tables using hibernate mapping

    - by Udo Fholl
    Hi all, I'd like to know if it is possible to fill up a class data from database using the hibernate hbm (mapping). For instance: public class someClass { List<OtherClass> otherClasses; List<YetAnotherClass> yetAnotherClasses; //Constructors ? class OtherClass { String name; //setters, getters } class YetAnotherClass { String name; //setters, getters } //setters, getters } Using an hbm can I fill in the data from tables OTHER_CLASS_TABLE and YET_ANOTHER_CLASS_TABLE? I have no such SOME_CLASS_TABLE since this info is for viewing only. I've been playing with the <join table=""><subselect> and different constructors... But it is not working Thanks! Sorry for my english!

    Read the article

  • nhibernate : mapping to column other than primary key

    - by frosty
    I have the following map. My intention is for the order.BasketId to map to orderItem.BasketId. Tho when i look at the sql i see that it's mapping order.Id to orderItem.BasketId. How do i define in my order map which order property to map against basketId. It seems to default to the primary key. <property name="BasketId" column="Basket_ID" type="Int32"/> <set name="OrderItems" table="item_basket_contents" generic="true" inverse="true" > <key column="Basket_ID" /> <one-to-many class="EStore.Domain.Model.OrderItem, EStore.Domain"/> </set>

    Read the article

  • Mapping enum to a table with hibernate annotation

    - by Thierry-Dimitri Roy
    I have a table DEAL and a table DEAL_TYPE. I would like to map this code: public class Deal { DealType type; } public enum DealType { BASE("Base"), EXTRA("Extra"); } The problem is that the data already exist in the database. And I'm having a hard time mapping the classes to the database. The database looks something like that: TABLE DEAL { Long id; Long typeId; } TABLE DEAL_TYPE { Long id; String text; } I know I could use a simple @OneToMany relationship from deal to deal type, but I would prefer to use an enum. Is this possible? I almost got it working by using a EnumType.ORDINAL type. But unfortunately, my IDs in my deal type table are not sequential, and do not start at 1. Any suggestions?

    Read the article

  • JPA hibernate OneToOne mapping

    - by Stupidfrog
    enviroment: hibernate 4.1.6.final spring 3.1.2.release spring jpa 1.1.0.release postgresql 9.1-901-1.jdbc4 there is 2 table public A { private Long id; private Long name; } public B { private Long id; private Long table_a_id; } the A.id and B.id is sequential, unique , but no related.(means they are separately id for their own table). how to do mapping? i have tried some method, however the result is not i wanted, because it bind wrong. for example: public A { .... @OneToOne @JoinColumn(name = "id") private B table_b } public B { ... @JsonIgnore @OneToOne(mappedBy = "table_b") private A table_a; } when i query A the result is { "id":5, "table_b":{ "id":5, "table_a_id":4 } } obviously the data join by using their id but not joining using table_a_id. what i expect is { "id":4, "table_b":{ "id":5, "table_a_id":4 } } so can somebody teach me that, how to map this 2 table by using table b table_a_id(foregin key)

    Read the article

  • Mapping to a different view based on child type

    - by Ryan Burnham
    So i have a situation where i have common base type but i need to map to a different view based on the child type. It looks like i can use a generic mapping class to handle the inheritance http://geekswithblogs.net/nharrison/archive/2010/07/09/inheriting-a-class-map-in-fluent-nhibernate.aspx But how can i conditionally map to a different view based on the child type? I see an EntityType property but it says its obsolete and will be made private in the next version. As an example i have a base class of ContactInfo is standard between contact types but the values come from different places depending on the contact type, this I'll handle through the sql view.

    Read the article

  • Efficient mapping for a particular finite integer set

    - by R..
    I'm looking for a small, fast (in both directions) bijective mapping between the following list of integers and a subset of the range 0-127: 0x200C, 0x200D, 0x200E, 0x200F, 0x2013, 0x2014, 0x2015, 0x2017, 0x2018, 0x2019, 0x201A, 0x201C, 0x201D, 0x201E, 0x2020, 0x2021, 0x2022, 0x2026, 0x2030, 0x2039, 0x203A, 0x20AA, 0x20AB, 0x20AC, 0x20AF, 0x2116, 0x2122 One obvious solution is: y = x>>2 & 0x40 | x & 0x3f; x = 0x2000 | y<<2 & 0x100 | y & 0x3f; Edit: I was missing some of the values, particularly 0x20Ax, which don't work with the above. Another obvious solution is a lookup table, but without making it unnecessarily large, a lookup table would require some bit rearrangement anyway and I suspect the whole task can be better accomplished with simple bit rearrangement. For the curious, those magic numbers are the only "large" Unicode codepoints that appear in legacy ISO-8859 and Windows codepages.

    Read the article

  • Mapping interface or abstract class component

    - by Yann Trevin
    Please consider the following simple use case: public class Foo { public virtual int Id { get; protected set; } public virtual IBar Bar { get; set; } } public interface IBar { string Text { get; set; } } public class Bar : IBar { public virtual string Text { get; set; } } And the fluent-nhibernate map class: public class FooMap : ClassMap<Foo> { public FooMap() { Id(x => x.Id); Component(x => x.Bar, m => { m.Map(x => x.Text); }); } } While running any query with configuration, I get the following exception: NHibernate.InstantiationException: "Cannot instantiate abstract class or interface: NHMappingTest.IBar" It seems that NHibernate tries to instantiate an IBar object instead of the Bar concrete class. How to let Fluent-NHibernate know which concrete class to instantiate when the property returns an interface or an abstract base class? EDIT: Explicitly specify the type of component by writing Component<Bar> (as suggested by Sly) has no effect and causes the same exception to occur. EDIT2: Thanks to vedklyv and Paul Batum: such a mapping should be soon is now possible.

    Read the article

  • fluent nHibernate mapping of subclassed structure

    - by Codezy
    I have a workflow class that has a collection of phases, each phase has a collection of tasks. You can design a workflow that will be used by many engagements. When used in engagement I want to be able to add properties to each class (workflow, phase, and task). For example a task in the designer does not have people assigned, but a task in an engagement would need extra properties like who is assigned to it. I have tried many different approaches using subclasses or interfaces but I just can't get it to map the way I want. Currently I have the engagement level versions as subclasses, but I can't get Engagement phases to map to engagement workflows. Public Class WorkflowMapping Inherits ClassMap(Of Workflow) Sub New() Id(Function(x As Workflow) x.Id).Column("Workflow_Id").GeneratedBy.Identity() Map(Function(x As Workflow) x.Description) Map(Function(x As Workflow) x.Generation) Map(Function(x As Workflow) x.IsActive) HasMany(Function(x As Workflow) x.Phases).Cascade.All() End Sub End Class Public Class EngagementWorkflowMapping Inherits SubclassMap(Of EngagementWorkflow) Sub New() Map(Function(x As EngagementWorkflow) x.ClientNo) Map(Function(x As EngagementWorkflow) x.EngagementNo) End Sub End Class How would you approach mapping this in fluent (or hbm) so that you could load just the workflow base class when designing the flow, or the engagement subclass versions of each when being used by an engagement?

    Read the article

  • nHibernate Self Join Mapping

    - by kmoo01
    Hi Guys, This is probably incredibly simple, but I just cant see the wood for the trees at the moment. For brevity, I would like to model a word object, that has related words to it (synonyms), In doing so I could have the following mappings: <class name="Word" table="bs_word"> <id name="Id" column="WordId" type="Int32" unsaved-value="-1"> <generator class="native"> <param name="sequence"></param> </generator> </id> <property name="Key" column="word" type="String" length="50" /> <many-to-one name="SynonymGroup" class="BS.Core.Domain.Synonym, BS.Core" column="SynonymId" lazy="false"/> <class name="Synonym" table="bs_Synonym"> <id name="Id" column="SynonymId" type="Int32" unsaved-value="-1"> <generator class="native"> <param name="sequence"></param> </generator> </id> <property name="Alias" column="Alias" type="String" length="50" /> <bag name="Words" cascade="none" lazy="false" inverse="true"> <key column="SynonymId" /> <one-to-many class="Word" /> </bag> Mapping it like this would mean for a given word, I can access related words (synonyms) like this: word.SynonymGroup.Words However I would like to know if it is possible to map a bag of objects on an instance of a word object...if that makes sense, so I can access the related words like this: word.Words I've tried playing around with the map element, and composite elements, all to no avail - so I was wondering if some kind person could point me in the right direction? ta, kmoo01

    Read the article

  • Hibernate one-to-one mapping

    - by Andrey Yaskulsky
    I have one-to-one hibernate mapping between class Student and class Points: @Entity @Table(name = "Users") public class Student implements IUser { @Id @Column(name = "id") private int id; @Column(name = "name") private String name; @Column(name = "password") private String password; @OneToOne(fetch = FetchType.EAGER, mappedBy = "student") private Points points; @Column(name = "type") private int type = getType(); //gets and sets... @Entity @Table(name = "Points") public class Points { @GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "student")) @Id @GeneratedValue(generator = "generator") @Column(name = "id", unique = true, nullable = false) private int Id; @OneToOne @PrimaryKeyJoinColumn private Student student; //gets and sets And then i do: Student student = new Student(); student.setId(1); student.setName("Andrew"); student.setPassword("Password"); Points points = new Points(); points.setPoints(0.99); student.setPoints(points); points.setStudent(student); Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); session.save(student); session.getTransaction().commit(); And hibernate saves student in the table but not saves corresponding points. Is it OK? Should i save points separately?

    Read the article

  • Mapping self-table one-to-many using non-PK clolumns

    - by Harel Moshe
    Hey, i have a legacy DB to which a Person object is mapped, having a collection of family-members, like this: class Person { ... string Id; /* 9-digits string */ IList<Person> Family; ... } The PERSON table seems like: Id: CHAR(9), PK FamilyId: INT, NOT NULL and several other non-relevant columns. I'm trying to map the Family collection to the PERSON table using the FamilyId column, which is not the PK as mentioned above. So, i actually have a one-to-many which is self-table-referential. I'm getting an error saying 'Cast is not valid' when my mapping looks like this: ... <set name="Family" table="Person" lazy="false"> <key column="FamilyId" /> <one-to-many class="Person" /> </set> ... because obviously, the join NHibernate is trying to make is between the PK column, Id, and the 'secondary' column, FamilyId, instead of joining the FamilyId column to itself. Any ideas please?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >