many to many relation crashes the program #67

Closed
mad93 opened this Issue Jan 2, 2013 · 6 comments

Comments

Projects
None yet
3 participants

mad93 commented Jan 2, 2013

I've created two tables:

user
id integer pk
name varchar(255)

group
id integer pk
name varchar(255)

When i try to create a relation many to many with user and group (user_group) the program crashes when selecting the second table.

First time it let me recover some of the structure but the second time I tried it I lost all unsaved modifications.

Owner

rkhaotix commented Jan 3, 2013

Ok, I'll check this. Thanks.

Em quarta-feira, 2 de janeiro de 2013, mad93 escreveu:

I've created two tables:

user
id integer pk
name varchar(255)

group
id integer pk
name varchar(255)

When i try to create a relation many to many with user and group
(user_group) the program crashes when selecting the second table.

First time it let me recover some of the structure but the second time I
tried it I lost all unsaved modifications.


Reply to this email directly or view it on GitHubhttps://github.com/pgmodeler/pgmodeler/issues/67.

rkhaotix closed this Jan 3, 2013

on1link commented Apr 3, 2013

i've the same crash in the last version of the program

Owner

rkhaotix commented Apr 3, 2013

@on1link can you describe the steps taken that made pgModeler crash?

If possible, send me (via email) your model file in order to debug it.

rkhaotix reopened this Apr 3, 2013

on1link commented Apr 3, 2013

i was working on the 0.4.1 version of the program.
When I choose "relationships" -> new relationship -> Many to Many.
I click the first table then the second, open the windows "Create / Edit: Relationship", so when i click on "Apply" the program crash.

Owner

rkhaotix commented Apr 3, 2013

Thanks. I'll work on it later.

Owner

rkhaotix commented Apr 4, 2013

@on1link

Testing your datamodel, I've found some bugs (fixes on the last commit 5ac6976) and discovered that you are using long table names.

There is no problem with that... PostgreSQL accepts 63 bytes long names... but when connecting "perfil_usuario_directorio_empresas" to "categoria_ocupacion" via Many to Many relationship pgModeler raises an error indicating that a invalid (too long name is being assingned to one of the objects of relationshp). This is happening because pgModeler concatenates the two names to create other objects that is used by the relationship.

So... while the definitive fix doesn't come out I suggest you to use the "table suffixes" field (with short values) on relationship editing form and, in the case of Many to Many relationships, specify a shorter name on field "Gen. Table Name".

Note: you'll have to compile the source from last commit to have access to all fixes.

Thanks ;)

rkhaotix closed this May 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment